• 🏆 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!

My Question is Leaking!

Status
Not open for further replies.
Level 6
Joined
Feb 5, 2012
Messages
1,685
I have a condition..


If distance between position of Unit X and position of Unit Y is greater than xxxxxx


Will the position of Unit X and Unit Y will leak?...


I have a trigger..

Every 0.01 seconds

Set Position_1 = position of random unit of units of type XXXX

Then i have another seperate trigger

Order Unit to move to Position_1

Will the Position_1 will leak?..
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
He is saying that your locs leak. Cache and then clean them afterwards. For the unit type thing, use set bj_wantDestroyGroup = true to avoid the group leak.

edit

Scratch the custom script. The GUI func for GroupEnumUnitsOfType doesn't work with it. Better cache the group beforehand and then clean it later (credit to Troll-Brain for mentioning this)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The pick random unit from group function uses the bj_wantDestroyGroup though, ofc it would not make sense to implement it in the create function without doing anything.

If you still need a location/object elsewhere and have access to it (like a global variable on it), of course that's not a leak. Only get rid of it when it becomes superfluous.
 
Status
Not open for further replies.
Top