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

Hero Gaining Experience equal to Damage?

Status
Not open for further replies.
Level 2
Joined
Apr 30, 2009
Messages
8
How could I make it so that a Hero would gain experience equal to the damage dealt on an enemy?

I've been trying to figure this out for quite some time, and I can't really get it to work in any way. If someone could help me, it would be greatly appreciated. :)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Create a damage detection system (here's one of my posts concerning damage detection: Damage Detection).

Change the actions "set event for Trigger" so it points towards the XP-trigger.

Then, in the XP-trigger you can simple use the condition if the attacking unit is a hero and set the action to "add XP to Damage Source: Integer(Damage Dealt).

The "Damage Source" is an event reaction, it can be found in the usual list (with triggering unit, ...).
The "Damage Dealt" is a real (I think) and can also be found in the usual list as an event reaction.

If you need more information, feel free to ask.
 
Status
Not open for further replies.
Top