Granting experience from killing buildings

Status
Not open for further replies.

Adonis

A

Adonis

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