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

[Solved] Damage taken event

Status
Not open for further replies.
Level 2
Joined
Mar 18, 2018
Messages
8
I want to have trigger that gives gold to the player for every damage his units deal. Something like every unit has 100% gold-leech. Similar to life steal, only istead of HP units receive gold.. I have been struggling for hours already, seems to me that damage taken event can only be used for specific unit. But it has to be universal for it to take in count damage boosts and hero levels etc. Can anyone help me out? Thanks in advance.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Wolf Rider Pillage might be able to do some of what you want. I suggest messing with it a bit to see if you can get it to fit your needs.

Otherwise you will need a damage detection system. There are dozens of such systems and many are GUI friendly. The idea is they convert the specific unit takes damage event into a generic unit takes damage event and then fire your triggers from that. One would add to owner of damage source the triggering damage converted to integer gold. If you want fractional damage to accumulate to gold you will need an accumulator variable in the form of a real array that index maps the accumulator to player slot number.
 
Level 2
Joined
Mar 18, 2018
Messages
8
Thank you very much Dr Super Good, I got to know which keywords to search for and got everything working perfectly (at least so far) using this damage detection system: GUI-Friendly Damage Detection v1.2.1.

Also thanks Fruit Forest, for effort, although it isn't quite what I was searching for since it has to be automatic and repeating among some other conditions, but it doesn't matter because I got it working anyway.
 
Status
Not open for further replies.
Top