• 🏆 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!

Reset hero level without resetting hp and stats?

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
Well, you'll have to do that manually by storing every stat (excluding bonuses) to variables, reset the hero's level back to 1 and set their stats to how it was before.

  • Reset level
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set unit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of unit) Equal to 10
        • Then - Actions
          • Set stats[0] = (Strength of unit (Exclude bonuses))
          • Set stats[1] = (Agility of unit (Exclude bonuses))
          • Set stats[2] = (Intelligence of unit (Exclude bonuses))
          • Hero - Set unit Hero-level to 1, Hide level-up graphics
          • Hero - Modify Strength of unit: Set to stats[0]
          • Hero - Modify Agility of unit: Set to stats[1]
          • Hero - Modify Intelligence of unit: Set to stats[2]
        • Else - Actions
But keep in mind that your hero will lose every skill point and learned ability.
 
Level 8
Joined
Jul 29, 2010
Messages
319
Well, you'll have to do that manually by storing every stat (excluding bonuses) to variables, reset the hero's level back to 1 and set their stats to how it was before.

  • Reset level
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set unit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of unit) Equal to 10
        • Then - Actions
          • Set stats[0] = (Strength of unit (Exclude bonuses))
          • Set stats[1] = (Agility of unit (Exclude bonuses))
          • Set stats[2] = (Intelligence of unit (Exclude bonuses))
          • Hero - Set unit Hero-level to 1, Hide level-up graphics
          • Hero - Modify Strength of unit: Set to stats[0]
          • Hero - Modify Agility of unit: Set to stats[1]
          • Hero - Modify Intelligence of unit: Set to stats[2]
        • Else - Actions
But keep in mind that your hero will lose every skill point and learned ability.

Thank you, this is exactly what i was looking for :D
 
Last edited:
Status
Not open for further replies.
Top