• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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