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

Damage detect source- Lightning shield

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2015
Messages
283
I'm using the damage engine
http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-5-4-1-a-201016/

I have a spell that spawns fire on the ground. These little fire spawn have permanent immolation. I use the damage detection to cast lightning shield on enemies burnt. Burnt enemies with lightning shield can burn other units and spread the fire.

If a unit dies with lightning shield by lightning shield, the caster is the killing unit. However the problem is that the source of damage from lightning shield is the unit with the buff and not the caster of lightning shield.

I need either:
A way to detect the damage source from the caster
or
Detect owner of the buff
or
A triggered lightning shield that saves the casting unit
 
Level 7
Joined
Nov 19, 2015
Messages
283
Best to use the last one.

You could try to make a unit array and store the source in it under the index of the custom value of the caster. (Requires Unit Indexer.)

Just looked up a unit indexer. So much easier than hashtables. I'm going to have to remake my missile system which took 3 days.

Thanks for the help. With this unit indexer, I can make a triggered lightning shield easier and will probs fix the problem. Thanks guys
 
Status
Not open for further replies.
Top