🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
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)
🔨 Downloads and Uploads have been fixed! If you still have trouble downloading or uploading assets to or from Hive, please reach out to us in the Site Discussion board.
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.