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

Gold income and dummy kill.

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Hi all, here is my question: if a hero cast a spell that uses a dummy to cause damage, the hero cannot receive gold from that kill. So is there a way to fix this other than setting every units gold value then use a UNIT_DEATH trigger?

Thanks all.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Depends. For example if it's a map like a hero arena (where you control only your hero), then you can change the owner of dummy to triggering player, then when someone dies, you check if the killer is a dummy unit, who he belongs to and add gold to that player (unless you gain the gold when the dummy kills it automatically)
 
Level 11
Joined
Oct 11, 2012
Messages
711
Depends. For example if it's a map like a hero arena (where you control only your hero), then you can change the owner of dummy to triggering player, then when someone dies, you check if the killer is a dummy unit, who he belongs to and add gold to that player (unless you gain the gold when the dummy kills it automatically)

Thanks for the reply. But how do I know how much gold I should add to that player?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
then you're in for quite a hard time really, because you cannot even detect who killed the targeted unit, if the killing unit is removed before the projectile hits the target.

Tbh I dunno what you want to do in the long run, but it may be better to have one generic dummy unit, which shoots these projectiles and when is paused (or moved somewhere) when unused. That way you will have for example 1 dummy per player who casts these spells and you can have easy time getting the bounty.
 
Level 11
Joined
Oct 11, 2012
Messages
711
then you're in for quite a hard time really, because you cannot even detect who killed the targeted unit, if the killing unit is removed before the projectile hits the target.

Tbh I dunno what you want to do in the long run, but it may be better to have one generic dummy unit, which shoots these projectiles and when is paused (or moved somewhere) when unused. That way you will have for example 1 dummy per player who casts these spells and you can have easy time getting the bounty.

Ok, I will try that. Thanks for the help. +Rep
:)
 
Status
Not open for further replies.
Top