• 🏆 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!

[Trigger] Need help with this

Status
Not open for further replies.
Level 1
Joined
Apr 1, 2009
Messages
3
Im trying to make a trigger where the player has to kill a specific number of enemy unit to activate a victory trigger.
I made this so far but it doesn't seem to work I don't know whats wrong with it.
I made an integer type variable named living.

  • Events
    • Time - Elapsed game time is 1.00 seconds
  • Conditions
  • Actions
    • Set living = 6
then I wanted the player to kill a specific number of Player 7's (an enemy player) units

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 7 (Green)
  • Actions
    • Set living = (living - 1)
    • Game - Display to (All players) for 5.00 seconds the text: You killed an enemy unit
Then I made the winning message like this to see if the trigger above works.

  • Events
    • Time - Elapsed game time is 1.00 seconds
  • Conditions
    • living Equal to 0
  • Actions
    • Game - Display to (All players) the text: You win!
but it doesn't work the variable doesn't seem to be subtracting.
Why doesn't it work?
Can anyone help me fix this trigger?...

Thanks
 
I know your problem(lol)Just wait a second.
There!Look at the 3 attached pictures!
Edit:Ive just added a map with the 3 triggers!
 

Attachments

  • 1.PNG
    1.PNG
    4.4 KB · Views: 75
  • 2.PNG
    2.PNG
    5.9 KB · Views: 75
  • 3.PNG
    3.PNG
    10.7 KB · Views: 106
  • Living6.w3x
    16.8 KB · Views: 48
Level 6
Joined
Oct 31, 2008
Messages
229
Hmm the sollution is simpler. You set living to 6 and the very same time you check if they all died. Even if you kill them in a trigger, they need some time before they are *dead* from the game. Hope i helped you
 
Status
Not open for further replies.
Top