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

Decreasing the level of a hero through, triggers?

Status
Not open for further replies.
Level 3
Joined
Sep 23, 2008
Messages
32
I while ago with a small simple project I was working on I encountered a bit of a stump. I wanted to allow for; under certain conditions that a hero who say, dies gets a penalty (loss of 1 or more level/s), but couldn't find or see a way to do so. I am pretty basic in my understanding of the world editor triggers (a.k.a a noob), so it could just be something that's above my knowledge for now, overlooked and/or have yet to learn or understand how to accomplish yet.

Simply put; is there a way to decrease the level of a hero unit via triggers or some other method/s within the editor?
 
Level 4
Joined
Apr 18, 2009
Messages
127
If you want to decrease the level by 1 each time use this:

  • H
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set Hero_Lvl = (Hero level of (Dying unit))
      • -------- Create a integer to use the variable above. --------
      • Hero - Set (Dying unit) Hero-level to (Hero_Lvl - 1), Hide level-up graphics
 
Status
Not open for further replies.
Top