• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Get caster of Parasite

Status
Not open for further replies.
If the Event Responses don't work properly for Parasite you'll probably have to use some advanced methods.

A Unit Indexer or Hashtable could be used to track the Caster of Parasite by linking the Caster to the Target. This way you can get the Caster from the Target when the Target dies.

Alternatively, if there is only a single unit with this Parasite ability then you can easily track the Caster using a unit variable.
 
Last edited:
But if the unit is killed by some other means while parasite is active, parasite will still trigger the unit spawn. Then you can't get the caster this way.
tumblr_mvsrht4E7n1shwi4yo5_250.gifv
 
But if the unit is killed by some other means while parasite is active, parasite will still trigger the unit spawn. Then you can't get the caster this way.
Lethal damage event catches the killer and Damagetype filter via condition or specifc dummy casters could narrow it down.
Damage Engine is way too overkill in my opinion. Unless they actually have the system in their map it's not worth it for a spell that can be solved with the most basic "custom value" method. Just need to link a Unit variable to a Unit.
If someone isn't using damage engine in their map or some equivalent it is already lacking.
Ah yeah, good point.
 
Lethal damage event catches the killer and Damagetype filter via condition or specifc dummy casters could narrow it down.
I don't think you understand the issue. The damage source is not necessarily the caster because the damage source could be something else entirely that happens to kill the unit and then spawn the parasite. Parasite doesn't require the caster to kill the target for a unit to spawn; it requires that the target dies while it has the buff. It could even be killed by a trigger or by a unit owned by a different player, etc..

The only solution I see is attaching information about the caster to the targeted unit (in a hashtable), so this info can be retrieved.
 
I don't think you understand the issue. The damage source is not necessarily the caster because the damage source could be something else entirely that happens to kill the unit and then spawn the parasite. Parasite doesn't require the caster to kill the target for a unit to spawn; it requires that the target dies while it has the buff. It could even be killed by a trigger or by a unit owned by a different player, etc..

The only solution I see is attaching information about the caster to the targeted unit (in a hashtable), so this info can be retrieved.

Hey, I've never used hashtables before, would you be able to explain how to do this?
 

First one is how I learned, it has an excellent test map to fiddle with.
 
Status
Not open for further replies.
Back
Top