• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] Struct storage...

Status
Not open for further replies.
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