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

Granting experience from killing buildings

Status
Not open for further replies.
Level 2
Joined
Mar 11, 2008
Messages
6
I was wondering if there was a way to give a hero an exact amount of experience after he/she kills a building. I was reading on other threads and found this:

1.) set point value of units to number of experience
2.) a new trigger

event:
a unit dies

condition:
owner of dying unit is an enemy of owner of killing unit equal to true

action:
add point-value of dying unit to killing unit

So I did this, but it doesn't seem to work when my hero destroys a building which was my original intention. Any help would be greatly appreciated.
 
Level 2
Joined
Mar 11, 2008
Messages
6
  • Event:
    • A unit dies
  • Condition:
    • dying unit is a structure equal to true and killing unit is a hero equal to true
  • Action:
    • add x experience to killing unit
just make this simple trigger

The only problem with this is that I would have to make a trigger for each building because I want it to be different for each building. However, I got the trigger I mentioned to work for the most part, now I just adjust the pointvalue on all the buildings I want, making that one trigger work for all buildings and units. Thank you all for your help and expect to hear from me again.
 
Status
Not open for further replies.
Top