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

Hero Gaining Experience equal to Damage?

Status
Not open for further replies.

AllGhilliedUp

A

AllGhilliedUp

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. :)
 
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.
Back
Top