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

Simple trigger

Status
Not open for further replies.
Level 4
Joined
Oct 13, 2009
Messages
43
Guys need help with simple trigger (just forgot how to do it)

How to make different units 2 spawn?-like 50%-that area will spawn footman or grunt
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If a random number between 1 and 2 equals 1, then create footmen. Otherwise create grunts.

  • Actions
    • Set tempLoc = (Center of Region)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Random integer number between 1 and 2) Equal to 1
      • Then - Actions
        • Unit - Create 1 Footman for Player 1 (Red) at tempLoc facing Default building facing degrees
      • Else - Actions
        • Unit - Create 1 Grunt for Player 1 (Red) at tempLoc facing Default building facing degrees
    • Custom script: call RemoveLocation( udg_tempLoc )
 
Status
Not open for further replies.
Top