Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
How should i write custom script to destroy unit array variable with variable index as not only number,but for example "(Player number of (Owner of (Casting unit)))"
You can't destroy a unit-array. You wouldn't need to anyways, since an array is not an object that will cause a memory leak. The only value that will cause a memory leak is the unit itself, which can be "destroyed" as Darkness-4ever has stated:
Well,what i wanted is to clear unit array variable from 1 unit - so the variable is empty (atleast 1 index of that array variable) like in the start of the game,not to destroy/kill unit and this isn't for leak purposes.
EDIT: I've found another way for thing i needed,but thanks for the efforts anyway ^^
The only reason I can think of as to why you would want to "destroy" them all at map initialization is so that you can distinguish between indexes that have and have not been used. In such a case, you can check if a unit variable is equal to "No unit" in which case it has not.
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.