HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Destroying Triggers

07-10-2006, 08:18 PM#1
FatalError
I found an article a while back about DestroyTrigger() not stopping the action. However, I can't seem to find it anymore. Could someone please point me to that topic? Or at least explain how to do that?
07-10-2006, 08:19 PM#2
Rising_Dusk
Well...
If you destroy a trigger as its actions are running, it will finish running UNLESS it finds a wait, in which case it will then return.

Dont know exactly what you were looking for, but that sounded like it.
Also, I have no idea which topic, but I fathom you can easily search the forum for it.
07-10-2006, 09:43 PM#3
Naakaloh
In addition to what Rising_Dusk said, if you remove the actions from the trigger while it's running it will stop the trigger, however, this will prevent anything after that part of the code from running including nulling variables and destroying/removing certain handles, assuming they are there.
07-11-2006, 04:29 AM#4
FatalError
Quote:
Originally Posted by Naakaloh
In addition to what Rising_Dusk said, if you remove the actions from the trigger while it's running it will stop the trigger, however, this will prevent anything after that part of the code from running including nulling variables and destroying/removing certain handles, assuming they are there.
Ah, that's what I was looking for. There was a topic where someone was testing this, I was looking for that, but your post answers my question. Thanks, Rep+


EDIT: Also, little question: Does CreateTrigger() leak in any way? In other words, if I am making a local trigger, do I have to set it to a variable and then null it? Or would it be fine if I just called CreateTrigger()?
07-11-2006, 09:39 AM#5
Anitarf
Quote:
Originally Posted by Rising_Dusk
If you destroy a trigger as its actions are running, it will finish running UNLESS it finds a wait, in which case it will then return.
Actually, that's what happens if you remove the triggeraction. If you just destroy the trigger without removing the triggeraction, then actions will finish despite the waits.
07-11-2006, 03:51 PM#6
PipeDream
It's not right for TRA either as that kills it immediately, waits or not.
07-11-2006, 04:55 PM#7
Freakazoid
Or download WEU, you have that action in GUI, with some explenation.
07-11-2006, 09:30 PM#8
Anitarf
Quote:
Originally Posted by PipeDream
It's not right for TRA either as that kills it immediately, waits or not.
Yeah, I thought that too and mentioned it to Vex on one occasion, he said it doesn't kill immediately, but only after a wait. Haven't tested it myself, I guess now I should. :/
07-11-2006, 09:58 PM#9
Vexorian
I tested and it will only dies if it finds a wait