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

[Trigger] Problem with turning off triggers

Status
Not open for further replies.
Level 25
Joined
Mar 23, 2008
Messages
1,813
I got this problem, its a boss fight, and at one phase the boss gets invulnerable and you have to kill the adds that spawns (felboar1, felboar2, felboar3) in order to get him vulnerable, you got also only 45 seconds to do that or he will kill every hero that is fighting him. ill show you some triggers and tell you more excatly whats the problem is:

This is the trigger that kills everyone within 45 seconds.
  • All killed
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Kill the adds withi...
      • Countdown Timer - Start FireInstantKill as a One-shot timer that will expire in 45.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Time until Fire Bla...
      • Wait 45.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Unit - Explode (Picked unit)
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 2 (Blue)) and do (Actions)
        • Loop - Actions
          • Unit - Explode (Picked unit)
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 3 (Teal)) and do (Actions)
        • Loop - Actions
          • Unit - Explode (Picked unit)
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 4 (Purple)) and do (Actions)
        • Loop - Actions
          • Unit - Explode (Picked unit)
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Countdown Timer - Destroy (Last created timer window)
      • Trigger - Turn off FelBoarDies1 <gen>
      • Trigger - Turn off FelBoarDies2 <gen>
      • Trigger - Turn off FelBoarDies3 <gen>
      • Trigger - Turn off First event2 <gen>
This is the trigger that spawns the adds (doesnt think this one is needed to show but i thought it would be best anyways):
  • FelBoarSpawn
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Fel Boar for Player 5 (Yellow) at (Random point in RandomMobsFireBeast <gen>) facing Default building facing degrees
      • Set Felboar1 = (Last created unit)
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 3.00 seconds
      • Unit - Create 1 Fel Boar for Player 5 (Yellow) at (Random point in RandomMobsFireBeast <gen>) facing Default building facing degrees
      • Set Felboar2 = (Last created unit)
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 3.00 seconds
      • Unit - Create 1 Fel Boar for Player 5 (Yellow) at (Random point in RandomMobsFireBeast <gen>) facing Default building facing degrees
      • Set Felboar3 = (Last created unit)
      • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Special Effect - Destroy (Last created special effect)
Here is the one that makes him not invulnerable and stops the trigger that makes everyone die after 45 seconds, (SHOULD) wich its not doing now, the kill trigger continues even that i have turned it off, can anyone explain this?

  • FelBoarDies3
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to Felboar3
      • (Felboar1 is dead) Equal to True
      • (Felboar2 is dead) Equal to True
    • Actions
      • Unit - Make Beast of Fire 0000 <gen> Vulnerable
      • Trigger - Turn off First event2 <gen>
      • Trigger - Turn off All killed <gen>
      • Set Felboar1 = No unit
      • Set Felboar2 = No unit
      • Set Felboar3 = No unit
'
I got 3 of this trigger btw, one for each felboar.
 
Level 5
Joined
Feb 21, 2009
Messages
136
If you run Trigger - Turn off Trigger, it doesn't stop the trigger from running, but simply prevents it from running again, you can make this work with an other trigger with the event, if timer expires, and if you turn that off it wont run because it has no waits. You leak as well so look into that also.
 
Status
Not open for further replies.
Top