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

[Solved] trigger turn off?

Status
Not open for further replies.
Level 2
Joined
Dec 22, 2012
Messages
19
ok, im kinda new to this so i need a little help here. :vw_unimpressed:
i made a trigger like this:
a unit is attacked
kill attacking unit.
im making this so that people cant rush. (i would make eveyone invunrable if i knew how, but thats antother story) the thing is i cant make it turn off within the same trigger. i would like to avoid using another trigger. (the "after XXX game time turn of XXXX" one) i want it to turn off after five minutes (300 seconds)heres what ill want it to do in trigger form.

a unit attacks a unit
kill attacking unit.
after 300 seconds of game time
display quest tmessage
turn off this trigger.

(sorry if i have bad english)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Instead of killing the attacking unit, wouldn't it be better to stop him? (Killing is exactly what you're trying to prevent).
You can do that with "Unit - Issue order with no target" and choose "Stop" there.

Anyway, if you don't want to create a new trigger:
  • Trigger
    • Events
      • Unit - A unit Is attacked
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Not equal to No unit
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
          • Wait 300.00 seconds
          • Game - Display to (All players) the text: You can now attack
          • Trigger - Turn off (This trigger)
 
Level 2
Joined
Dec 22, 2012
Messages
19
Instead of killing the attacking unit, wouldn't it be better to stop him? (Killing is exactly what you're trying to prevent).
You can do that with "Unit - Issue order with no target" and choose "Stop" there.

Anyway, if you don't want to create a new trigger:
  • Trigger
    • Events
      • Unit - A unit Is attacked
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Not equal to No unit
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
          • Wait 300.00 seconds
          • Game - Display to (All players) the text: You can now attack
          • Trigger - Turn off (This trigger)

thank you, you have helped me a bunch.
 
Status
Not open for further replies.
Top