• 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.

Need help to make a ''survival'' thing

Status
Not open for further replies.
Level 6
Joined
Aug 27, 2008
Messages
182
Hi.

I'm making a kinda survival thing in my map. It's a battle in an arena there it's 3v3 against eachother. But i can't find out how to make my units move instantly to another location when all on the other team is dead.

So if anyone can help me with a trigger to make something happen when the players on the enemy team is dead please post here or send a PM

I've been trying in several days, but can't find it :cry:
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Try this:
  • Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set LivingHeroes[1] = 3
      • Set LivingHeroes[2] = 3
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to (Random player from Player Group - Player 1 (Red))
        • Then - Actions
          • Set LivingHeroes[1] = (LivingHeroes[1] - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HeroPickArray_Players[1] Equal to 0
            • Then - Actions
              • Unit - Move Hero[4] instantly to (YOUR REGION)
              • Unit - Move Hero[5] instantly to (YOUR REGION)
              • Unit - Move Hero[6] instantly to (YOUR REGION)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to (Random player from Player Group - Player 2 (Blue))
        • Then - Actions
          • Set LivingHeroes[2] = (LivingHeroes[2] - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • LivingHeroes[2] Equal to 0
            • Then - Actions
              • Unit - Move Hero[1] instantly to (YOUR REGION)
              • Unit - Move Hero[2] instantly to (YOUR REGION)
              • Unit - Move Hero[3] instantly to (YOUR REGION)
            • Else - Actions
        • Else - Actions
-LivingHeroes is a integer variable that checks how many heroes are alive in team 1 (Array [1]) and 2 (Array 2)
-I'm not entirely sure about the conditions that check if the owner of the triggering unit is in team 1 or 2. Maybe you can change that if it doesn't work.
-Hero is a Unit variable that checks the hero of player X with it's arrays. (Player 1's hero is Hero[1], Player 2's hero is Hero[2], etc.)
-YOUR REGION is the region you want to send the heroes of the winning players to.

As you see, LivingHeroes[1/2] go down by 1 when the unit that died is owned by the player in that team. If it reaches 0, the other team is transported. If you got more teams, heroes or players, you can add Arrays to the variables.
If you can also revive heroes, you need to set LivingHeroes[1/2] to LivingHeroes[1/2] + 1 in that same trigger.

Good luck :wink:
 
Level 6
Joined
Aug 27, 2008
Messages
182
i'll try :gg:

but how is the '' HeroPickArray_Players[1] Equal to 0'' meant to be? and what type of comparision is it?

and can you show all the variables i have to make?

when i tried i'm missing something of what you wrote because i didn't understand:

HeroPickArray_Players[1] Equal to 0

and

LivingHeroes[2] Equal to 0
 
Last edited:
Status
Not open for further replies.
Top