• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Stop Trigger Function

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: hello!
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A structure) Equal to False
        • Then - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: hello!
        • Else - Actions
If the dying unit is a structure, the second hello won't be displayed.
 
Level 8
Joined
Sep 23, 2007
Messages
357
I mean without an if/then/else, what im trying to do is get the trigger to stop dead in the middle if something is not true because i have multiple if/then/else functions and I dont want to have to put floating text in all of them or put them within more if/then/elses because im trying to be as efficient as possible.

If that is the only way then ill do it.

And I think you already knew that I would know how to do a simple if/then/else function, yet you didn't try to understand what it was I was really asking for
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
That is exactly what I was looking for, thanks :)

If not, I'll use Super Good's suggestion

By destroying the trigger, mentioned by mckill2009 the trigger will not exist anymore.
Which means you can't "run" the trigger anymore.
So whenever you're done using a trigger and you're absolutely sure you're not going to use it again, simply destroy it.
It's also usefull to add this to for example initialization triggers. Since they are only used once...
 
Never tried to do many testings to destroy a trigger before, but if DSG is right
about crashes, then TurnOffTrigger will do...

Trurn off will not stop trigger. Just prevent from calling once again.
Wrong, it will completely stop the trigger from functioning unless called by another function to turn it on or run it...

on the other hand, "SkipRemainingActions" still runs the trigger even if you put
it on top...
 
Status
Not open for further replies.
Top