[vJASS] Struct storage...

Status
Not open for further replies.
Level 29
Joined
Mar 10, 2009
Messages
5,016
OK, here's the situation...

I cast a spell then the struct/timer holds every data of the spell such as damage/AoE etc...via SetTimerData of TimerUtils...the spell also summons dummy units every second, when the dummy unit dies it damages enemies using GroupEnumUnitsInRange...

My question is, how to transfer/get the data stored from the struct or GetTimerData(t) to the dummy without using hashtables so that the dummy can damage the enemies?...

the code has this event...

JASS:
call TriggerRegisterAnyUnitEventBJ(t1, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerRegisterAnyUnitEventBJ(t2, EVENT_PLAYER_UNIT_DEATH)
 
you can always start a new timer for each dummy which expires after 1 second or whatever, and then just kill the dummy when that timer ends and do the desired effects... or you can make an array member of the struct to store the dummies of an instance, and maybe another array member to set/check the life span of the dummy...
 
Status
Not open for further replies.
Top