• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Come here, i need help !!!

Status
Not open for further replies.
Level 2
Joined
Mar 2, 2016
Messages
9
I want to make a trigger.
When 4 Unit dies (specifitic), do action.
(These 4 Units need to die, no one, with one dont trigger the trigger).

Thanks.
 
Level 5
Joined
Jul 18, 2010
Messages
159
Create variable for example "x" set it to 0.
Create trigger that adds 1 to "x" when specific unit dies and then runs condition if(x>=4) then do something.
Hope that helped.
 
Level 15
Joined
Jan 27, 2007
Messages
948
Yes, and you can run the command every time a unit dies, to avoid making a periodic event. Something like this:
  • Trigger
    • Events
      • Unit - Peasant Dies
      • Unit - Footman Dies
      • Unit - Peon Dies
      • Unit - Grunt Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DeadCount Equal to 4
        • Then - Actions
          • (do action here)
        • Else - Actions
          • Set DeadCount = DeadCount + 1
 
Status
Not open for further replies.
Top