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

[Trigger] Unit Ranking System

Status
Not open for further replies.
Level 10
Joined
Feb 19, 2006
Messages
237
  • Unit Attack
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
      • ((Owner of (Killing unit)) is an ally of (Owner of (Dying unit))) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Unit Attack for (Killing unit)) Equal to 0
        • Then - Actions
          • Unit - Add Unit Attack to (Killing unit)
        • Else - Actions
          • Unit - Increase level of Unit Attack for (Killing unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Unit Life for (Killing unit)) Equal to 0
        • Then - Actions
          • Unit - Add Unit Life to (Killing unit)
        • Else - Actions
          • Unit - Increase level of Unit Life for (Killing unit)
I have created two abilities, "unit attack" and "unit life" which are based of the "item damage bonus" and "item life bonus" abilities respectively. This trigger does work fully for the units attack but there is an issue with the unit life. It INITIALLY increases the unit's life if the unit does not have the ability but when the "unit life" ability is leveled up, nothing happens. I have made sure to edit the "unit life" ability so that every level it gives 10, 20, 30, 40, etc health.

I do not know what else i can do and why the unit attack works but the life does not.
 
Level 7
Joined
Jul 20, 2009
Messages
295
There is a bug with the +Life abilities, ap0calypse did point it out for me with my map.
Try the link given by Spinnaker:
http://www.hiveworkshop.com/forums/.../need-help-changing-heros-life-points-199174/

Edit: Copy the 2 triggers into your map,
Set Max Hp
Set Max Mana
Also, copy the 2 abilities:
Max Life Modifier
Max Mana Modifier

and change your triggers to this:
  • Unit Attack
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
      • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Unit Attack for (Killing unit)) Equal to 0
        • Then - Actions
          • Unit - Add Unit Attack to (Killing unit)
        • Else - Actions
          • Unit - Increase level of Unit Attack for (Killing unit)
      • Set Some_Unit = (Killing unit)
      • Set Max_Hp = ((Integer((Life of (Killing unit)))) + X)
      • Trigger - Run Set Max Hp <gen> (ignoring conditions)
This setting of Hp is constant, you can change it to whatever type you want.
 
Last edited:
Status
Not open for further replies.
Top