• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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