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!
Question : what is better , to move units through cycle or push in the squad , and move through it ,,,, about leak I would wanted to make sure that the motion timer cycle not leak
Using wrong words for example makes it not understandable.
By using my imagination, I guess you may want to say:
"what is better , to loop trough unit arrays or trough unit groups"... (I can't guess what are you trying to say in the next sentence) about leak I would wanted to make sure that the motion timer cycle not leak.
Don't know if you really mean that or something completely different tho.
Anyways.. if that's what you mean - both have pros and cons. In most cases I stick to unit groups, UNLESS I need to count the units in the group 1-st and then do actions. In that case - during the loop I remove the units from the group (since I'm using FoG method), and save them in a unit array, then I just loop the array, and clear it at the same time.
However, if you aren't using FoG method, then stick to unit groups
Neither periodic timers or periodic triggers leak by themselves. Using unit groups also does not leak as long as the unit group object and its handle is managed correctly. Issuing units orders individually or in a group both do not leak.
Issue the units individually if you detect them individually. If you are dealing with groups then issue them as a group.
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.