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

[Trigger] Assistance of Clearing a Round

Status
Not open for further replies.
Level 3
Joined
Jun 18, 2008
Messages
28
I'm not totally sure how to code a trigger for killing everyone who attacks a certain region.

Basically:
- You have a team of people who are defending a key landmark from attack.
- The landmark has 20000hp and cannot be repaired.
- Landmark destroyed ends game for player.

Wave 1:
- 20 Ghoul Devourers spawn
- After 60 seconds, 40 more spawn
What I don't understand is how to count all enemies of units (Player Yellow) that all must be killed before a new round begins. What is the trigger command to create an action to make it so all Yellow units are killed before the next round starts?

Can you please help me out? - Phoenix
 
Level 6
Joined
Jan 31, 2009
Messages
166
I think this shold help

So basicly what you want is a trigger that activates when the all the units from wave 1 are dead and starts the next wave?

  • Wave Starter
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
    • Actions
      • Set EnemysDead = (EnemysDead + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EnemysDead Equal to 60
        • Then - Actions
          • Trigger - Run Wave 2 <gen> (ignoring conditions)
        • Else - Actions
I think this should work for you (note you must create an intager varable called EnemysDead in the variable editor (Cntrl - B or the little golden x at the top of the trigger editor)

The trigger that spawns the next wave would be Called Wave 2 and it doesn't need to have any events or conditions

Hope that helps feel free to email me ([email protected]) ask questions here or Pm me if you don't understand this
 
Level 3
Joined
Jun 18, 2008
Messages
28
Okay, I'll try out the triggers.

Should they work, I'll give you +rep.

Thank you so much! Your help pushes out my map on the Hive quicker than normal!
 
Status
Not open for further replies.
Top