• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

'saving' units

Status
Not open for further replies.
Level 9
Joined
Dec 21, 2006
Messages
490
hi

create an int variable for example "counter"
create an unit variable with array (i.e. Units[])
create an buff variable with array(i.e. behavior[])
create a w/e var with array

save all your possible buffs into the array variable
for example buff[1] = slow
then everytime you save a unit

save the unit to units[counter]
set the first custom value of the unit to counter
then save the buff to the 2nd custom value(always the array int of the buff)

etc , you can save everything on the unit like this
just make a list which costum value saves which ability
else you will lose the overview

hope you got everything
 
Status
Not open for further replies.
Top