• 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.

Check if unit has alredy been afected

Status
Not open for further replies.
Level 1
Joined
Dec 6, 2019
Messages
4
I have a unit "caster" that creates a proyectile "shockwavedummy", every 0.03 seconds it picks all the units in a 200 radius of the proyectile and deals 100 magic damage to them.
What i want is to check if a unit has alredy been dealt damage to, and if so, to not damage them again.

i've come up with this trigger, which remembers which units have been dealt damage, but the problem is that it does so anyway.

any advice on how to make it work?

51621fbf81a785f9d944ceab0edc7b4a.png
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Since your trigger is not MUI anyway, just use a single unit group variable instead of dealing with hashtables.

1- Clear your unit group at spell cast trigger.
2- At periodic trigger, if picked unit is not in that unit group, add picked unit to the group and deal damage.
3- (Not necessary, since you already do this at the start but I like being safe) Clear unit group at the end of the spell.
 
Status
Not open for further replies.
Top