• 🏆 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!

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