| 10-26-2004, 05:07 AM | #1 |
Greetings. Neither TriggerClearActions() nor DestroyTrigger() cancel a trigger that's currently running. What does? |
| 10-26-2004, 05:21 AM | #2 | |
Guest | Quote:
If you get to a point in a trigger that you just dont want to run the rest of the stuff in it use... Code:
skip remaining actions it will just skip everything after it and stop the trigger |
| 10-26-2004, 06:00 AM | #3 |
I'm talking about cancelling a trigger from outside of itself. |
| 10-26-2004, 06:37 AM | #4 | |
Guest | Quote:
You can't stop a trigger while its running midway unless its in a trigger queue then you can remove it from the queue and will stop the trigger is its already running. I would suggest something like this. At the start of each trigger add it to a trigger queue and then remove it from the queue at the end. If you need to you can remove the trigger from the queue from another trigger making it stop even if its running. |
| 10-26-2004, 10:55 AM | #5 |
I suppose you could have a global boolean variable to check if the trigger should run, but if you have a lot of trigger that'd be difficult to implement. I don't know about trigger queues though, to my knowledge you can't queue up a trigger for any specified duration; it just runs once your processor is free. |
| 10-26-2004, 12:29 PM | #6 |
A way (maybe the only way, but probably not) would be to put some if-then-elses into the trigger that skip remaining actions if a certain boolean is true (so, you can set that boolean outside the trigger). Messy. |
| 10-26-2004, 01:14 PM | #7 |
Yeah I've done this by checking a global bool-var in the running trigger. |
| 10-26-2004, 03:03 PM | #8 |
Indeed, that's how Blizzard does it. weaaddar once suggested that an alternative was possible, though I haven't been able to get anything to work in that regard. I'm not entirely sure what the difference here is between running a trigger and queueing it. |
| 10-26-2004, 03:40 PM | #9 |
Yes, here is the thread where weaaddar speaks of this. |
| 10-26-2004, 08:23 PM | #10 |
Thank you. I originally saw it on the b.net forums, and didn't realize that he also posted it here. |
