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!
if i set a temporary point several times in a trigger without waits do i need to remove them each time i create them or just in the end of the trigger?
i just had a little thought, let's say i have a loop wich each time checks distance between temp_point and temp_point_1 or something, do i then each loop have to remove the leak? even if i dont set the points to something else?
Well if your comparing a point to another point, then you might want to save the one that your trying to get closer to until its no longer refrenced to, but if you change the other point, then remove it as the last thing in the loop, and set it at the top, since Blizzard never really thought about leaks and such in GUI
Huh, I read again my post and maybe it could cause some confusion...
I meant it should be removed after you don't need it anymore.
A point is like an object in the map that must be removed when it's useless. And, whenever you use "Set var = point", you're creating a new "object". So, if you don't remove it before setting the variable again, you won't be able to do so anymore.
Therefore, you have to remove/set point variables in a loop if you need to change it. If the point remains constant during the whole loop, set it before looping and remove after doing so. Like this:
-------- Creating 6 units in random points --------
For each integer (Integer A) from 1 to 6 do (Actions)
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.