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!
The Variables generated by using the GUI-Variable-Editor are Global. They can be read/written from any Trigger. But have always the last written value.
Except you define them local for a trigger.
By using custom skript.
Custom script: local integer udg_Int
In this case the variable can only be read or written in this trigger run only.
Have to be the first line of Code in a Trigger.
It can be used in multiple triggers but you need to be very careful that uses do not overlap. For example 2 triggers can use it as a temporary storage location for a unit, location, group etc but you need to make sure that only 1 instance of both triggers can be running at the same time. Calling some actions will cause other triggers to fire and interrupt the current trigger for example DamageUnit will cause damage event triggers to fire and interrupt the calling thread. In such cases you need to be careful that global variable usage does not overlap otherwise you might lose track of some values resulting in leaks of buggy behaviour.
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.