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

Gaining Exp Within A Certain Range of a Dying Enemy

Status
Not open for further replies.
Level 4
Joined
Apr 16, 2008
Messages
80
How can I make it so that a hero within a certain range of a dying creep gains exp from it (when not having killed it). Much like what happens in DoTA where all allies near enemy creeps as they die gain exp.

Is there some easy way to do this or does it require some triggers? Thanks for any help! :)
 
Level 4
Joined
Apr 16, 2008
Messages
80
Hmmm...that's what I thought it was, but it wasn't working properly for me. What about creeps that are killed from towers and not other heroes?
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Nope, you are supposed to get XP from the death of every hostile unit around your hero in a certain radius. It doesn't matter if it was killed by towers or other heroes.
By default, I think, you don't gain XP from destroyed building, but you can check a field in the gameplay constants so your hero will gain xp from destroying buildings as well.
If you have a problem with not getting xp from your allies' kills then make an empty map, place some creeps for neutral hostile, some units for player 2, make it your ally, place a hero for yourself and towers and whatever and see what happens.
 
Level 4
Joined
Apr 16, 2008
Messages
80
Ahh thanks, I found it. In Gameplay Constants, the very top one is "Build Kills Grant XP". I thought before that meant that when you destroy a building, you gain XP for it....but now I understand that it means that when a BUILDING kills something, THEN you get exp for it :) The exp is working now.
 
Level 6
Joined
Mar 17, 2008
Messages
150
You mean like this?

  • EXP range
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Neutral Hostile
      • ((Region centered at (Position of (Dying unit)) with size (200.00, 200.00)) contains (Ally of Killing Unit )) Equal to True
    • Actions
      • Hero - Add 250 experience to (Killing unit), Show level-up graphics
 
Status
Not open for further replies.
Top