• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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