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!
Do the "Trigger-Turn off Trigger" in GUI and custom script "call DestroyTrigger(GetTriggeringTrigger())" provide the same function? If not, then what's the difference between them? Do I have to use both in a trigger that I only want to happen once (e.g. initialization) ?
As you can see they are completly different native functions meaning there is very little chance of them behaving in a similar way.
DestroyTrigger's behaviour is implied by its name. It attampts to destroy the passed trigger handle, freeing the resources it used. In addition to this, it also will destroy all attached events. Apparently it does not destroy attached conditions and actions so those will have to be dealt with separatly with their appropiate deconstructors. Unfortunatly this function is not always sucessful when called and can instead result in a fatal error (game crash) in the case that a trigger is in a certain unsupported state during the deconstruction attempt.
DisableTrigger's behaviour is also implied by its name. It turns the passed trigger off preventing all bound events from executing the trigger. Disabling a trigger will obviously not free all tied up system resources.
Imagine a trigger being an airconditioning system keeping your house at a constant temperature. This is a good comparision as airconditioning also has events (changes in teperature), conditions (certain temperature settings) and actions (turn on heater / cooler).
DestroyTrigger is like ripping out the airconditioning control system. All teperature sensors are gone so is the control electronics but the teperature setting pannel (condition) still remains and the working elements (actions) also remain installed.
DisableTrigger is like turning off the airconditioning system. You can still turn it on again at any time and it will still exist in your house but it just will be off and do nothing.
I do not understand what you are asking... You create triggers and events like always just you destroy them when they are no longer needed to free the system resources they used as they are no longer needed. Ofcourse you are meant to but the crash prone nature of DestroyTrigger means it is unsafe to use in certain situations.
I am just a GUI user that doesn't know to much about jass xD.
Anyway so if you create the trigger add actions then destroy the trigger the actions will be gone.
So if/when you recreate the trigger you would have to recreate the actions again right.
Just asking because this would beable to make using triggers with the event a unit comes within X.xx range of Unit would be more flexible.
No. You need to invoke the deconstructor on the action object specificly. People have reported the action deconstructors being faulty which is why conditions are used instead.
So if/when you recreate the trigger you would have to recreate the actions again right.
Turn off the alarm clock, you can use it latter, but destroy your alarm clock, you cant use it latter...
But you can retrieve your actions by creating the trigger again...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.