• 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.

DestroyTrigger

Status
Not open for further replies.

EdgeOfChaos

E

EdgeOfChaos

It will not stop execution of the trigger if it's already running. It just permanently removes it from memory after it finishes completion.

It's basically only useful for preventing some triggers sticking around and wasting memory after they finish and won't be called again.

(To any who doubt: try this)
  • Melee Initialization
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Test 1
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
      • Game - Display to (All players) the text: Test 2
 
If actions executed by given trigger take some time (let's say it's a queue of actions), you could add few flag checkers in key-steps. If the flag is set to false (skip), call the return function to stop the execution of remaining actions.

In other trigger, the one responsible for cine skipping, respond to ESC event and set flag accordingly.
 
If actions executed by given trigger take some time (let's say it's a queue of actions), you could add few flag checkers in key-steps. If the flag is set to false (skip), call the return function to stop the execution of remaining actions.

In other trigger, the one responsible for cine skipping, respond to ESC event and set flag accordingly.

But that's the old way. :/

I guess I will just overcome my laziness. Thanks for the replies.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
ITE? There are options to stop the current thread, like 0 division. Timers can be paused/destroyed. TriggerSleepActions would be replaced. Maybe each time TriggerSleepAction is called, check if the triggering trigger has been destroyed. You could rewrite the UI\TriggerData.txt + UI\TriggerStrings.txt.
 
Using the "Skip Remaining Actions"return inside of an if-then-else block does end the trigger (function) it is placed in. If-then-else blocks are not isolated to their own functions in GUI. You are thinking of looping over units, players, destructables, or items.

Sorry you are correct. I was thinking about the conditions for GUI that create there own functions.

Sorry for the mix up. Been a very long time since I used GUI.
 
Status
Not open for further replies.
Top