• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Leaver, move his hero to a specific region

Status
Not open for further replies.
Level 3
Joined
May 30, 2012
Messages
29
i create it Trigger.

  • Leaver 1
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Set LeaverGoldAver[1] = ((Player 1 (Red) Current gold) / (PlayerCountL - 1))
      • Set LeaverWoodAver[1] = ((Player 1 (Red) Current lumber) / (PlayerCountL - 1))
      • Set PlayerCountL = (PlayerCountL - 1)
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>)
            • Else - Actions
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Player - Make Player 1 (Red) treat (Picked player) as an Ally
      • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Ally
      • Game - Display to (All players) the text: ((***** + (Name of (Triggering player))) + ***** |cffdf0000has left game|r, )
      • Wait 0.10 game-time seconds
      • Trigger - Turn off (This trigger)
All is fine, but when the player leave in time of Raspawn (When hero is dead and you should wait to control him again).

The hero revive, in normal region, but does not in region for leaver.

When he is playing and leaves, he moves to RegionLeaver.


It is the Trigger, for Revive hero.

  • Revive Hero 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Countdown Timer - Create a timer window for DeadHeroMsgTimer[1] with title (Name of Player 1 (Red))
      • Countdown Timer - Start DeadHeroMsgTimer[1] as a One-shot timer that will expire in ((Real((Hero level of (Triggering unit)))) x 4.00) seconds
      • Set DeadHrMsgTimerWin[1] = (Last created timer window)
      • Wait ((Real((Hero level of (Triggering unit)))) x 4.00) seconds
      • Countdown Timer - Destroy DeadHrMsgTimerWin[1]
      • Hero - Instantly revive (Triggering unit) at (Center of StartPointL <gen>), Show revival graphics
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of StartPointL <gen>) over 0.50 seconds
 
Last edited by a moderator:
Level 3
Joined
May 30, 2012
Messages
29
No, it is 5x5 Players.

  • Leaver 1
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Set LeaverGoldAver[1] = ((Player 1 (Red) Current gold) / (PlayerCountL - 1))
      • Set LeaverWoodAver[1] = ((Player 1 (Red) Current lumber) / (PlayerCountL - 1))
      • Set PlayerCountL = (PlayerCountL - 1)
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerLeft[(Player number of (Owner of (Triggering unit)))] Equal to True
        • Then - Actions
          • Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>)
        • Else - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of StartPointL <gen>), Show revival graphics
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Player - Make Player 1 (Red) treat (Picked player) as an Ally
      • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Ally
      • Game - Display to (All players) the text: ((***** + (Name of (Triggering player))) + ***** |cffdf0000has left game|r, )
      • Wait 0.10 game-time seconds
      • Trigger - Turn off (This trigger)
 
Last edited by a moderator:
  • Leaver 1
    • Events
      • Player - Player 1 (Red) leaves the game
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
    • Actions
      • Set LeaverGoldAver[1] = ((Player 1 (Red) Current gold) / (PlayerCountL - 1))
      • Set LeaverWoodAver[1] = ((Player 1 (Red) Current lumber) / (PlayerCountL - 1))
      • Set PlayerCountL = (PlayerCountL - 1)
      • Set PlayerLeft[(Player number of (Triggering player))] = True
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>)
            • Else - Actions
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Player - Make Player 1 (Red) treat (Picked player) as an Ally
      • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Ally
      • Game - Display to (All players) the text: ((***** + (Name of (Triggering player))) + ***** |cffdf0000has left game|r, )
      • Wait 0.10 game-time seconds
      • Trigger - Turn off (This trigger)
  • Revive Hero 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Countdown Timer - Create a timer window for DeadHeroMsgTimer[1] with title (Name of Player 1 (Red))
      • Countdown Timer - Start DeadHeroMsgTimer[1] as a One-shot timer that will expire in ((Real((Hero level of (Triggering unit)))) x 4.00) seconds
      • Set DeadHrMsgTimerWin[1] = (Last created timer window)
      • Wait ((Real((Hero level of (Triggering unit)))) x 4.00) seconds
      • Countdown Timer - Destroy DeadHrMsgTimerWin[1]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerLeft[(Player number of (Owner of (Triggering unit)))] Equal to True
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of LeaverHum <gen>), Show revival graphics
        • Else - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of StartPointL <gen>), Show revival graphics
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of StartPointL <gen>) over 0.50 seconds
 
Level 3
Joined
May 30, 2012
Messages
29
.... What is the problem? is it hard to fix? People just coment, but none help. what happend?

Magtheridon96 you trigger dont work.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
  • Init
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • ((Picked player) slot status) Equal To Playing
            • 'THEN'-Actions
              • Trigger - Add to Leave <gen> the event (Player - (Picked player) leaves the game)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • ((Picked player) is in Team1) Gleich True
                • 'THEN'-Actions
                  • Set RevivalLoc[(Player number of (Picked player))] = Team1RevivalLoc
                • 'ELSE'-Actions
                  • Set RevivalLoc[(Player number of (Picked player))] = Team2RevivalLoc
            • 'ELSE'-Actions
              • Set RevivalLoc[(Player number of (Picked player))] = DeadRevivalLoc
  • Leave
    • Events
    • Conditions
    • Actions
      • Set RevivalLoc[(Player number of (Triggering player))] = DeadRevivalLoc
Revive at RevivalLoc[(Player number of (Owner of (Triggering unit)))] then.
 
Level 3
Joined
May 30, 2012
Messages
29
  • kickTeamHum
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to blue
        • Then - Actions
          • Game - Defeat Player 2 (Blue) with the message: Has Been Kicked.
          • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to teal
        • Then - Actions
          • Game - Defeat Player 3 (Teal) with the message: Has Been Kicked.
          • Unit Group - Pick every unit in (Units owned by Player 3 (Teal)) and do (Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to purple
        • Then - Actions
          • Game - Defeat Player 4 (Purple) with the message: Has Been Kicked.
          • Unit Group - Pick every unit in (Units owned by Player 4 (Purple)) and do (Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to yellow
        • Then - Actions
          • Game - Defeat Player 5 (Yellow) with the message: Has Been Kicked.
          • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow)) and do (Unit - Move (Picked unit) instantly to (Center of LeaverHum <gen>))
        • Else - Actions
 
Status
Not open for further replies.
Top