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

Units Create Multiplying

Status
Not open for further replies.
Level 7
Joined
Feb 6, 2008
Messages
133
this is my second time trying to do this..

1 unit will be summoned or created by team red and blue in 10 seconds (Working but with errors)
When -Team- destroyed Opponent's farm means victory (Not Working)

now the one with errors .. it suppose to summon just 1 unit but when the opposing team attacks the farm the victim will keep multiplying its unit summoning i dont know why please help !
 

Attachments

  • Test Map Trigger Test 2.w3x
    18.3 KB · Views: 48
Level 11
Joined
Feb 18, 2004
Messages
394
  • Units Spawn Attack T2
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Victim <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Create (0 + 1) Grunt for Player 2 (Blue) at (Center of Region 003 <gen>) facing (Position of Farm 0019 <gen>)
          • Unit - Order (Last created unit) to Attack Farm 0019 <gen>
You're using a periodic event... if you want only one unit to spawn in 10 seconds, instead of every 10 seconds, use this event:
  • Time - Elapsed game time is 10.00 seconds
  • Farm Death T2
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If ((Farm 0018 <gen> is dead) Not equal to (Farm 0018 <gen> is alive)) then do (Game - Victory Player 1 (Red) (Show dialogs, Show scores)) else do (Game - Victory Player 1 (Red) (Show dialogs, Show scores))
... thats just... so wrong. Here is where you want to use a periodic event. something like:
  • Farm Death T2
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Farm 0018 <gen> is dead) Equal to True
        • Then - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        • Else - Actions
 
Status
Not open for further replies.
Top