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

Hero Minimum and Maximum level

Status
Not open for further replies.
Level 9
Joined
Apr 22, 2020
Messages
430
Hello guys do any of you guys know how to limit the level of a specific hero? Like i want my ai hero to have a maximum level of 15 but at the same time my actual heroe's maximum level is level 10 do you know how to do this guys?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Set the maximum hero level to 15.

Then when a player's Hero gains a level, if it's current level is >= 10, set it's level to 10 and disable it's experience gain.

If it managed to overlevel, like jumping from level 9 to level 11, you'll want to remove the extra Skill Points as well.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Set the maximum hero level to 15.

Then when a player's Hero gains a level, if it's current level is >= 10, set it's level to 10 and disable it's experience gain.

If it managed to overlevel, like jumping from level 9 to level 11, you'll want to remove the extra Skill Points as well.
Ohh okay and one question how do i let them gain a level for example my heroe's level is 6 i want them to level up until level 8 and if the hero reach that certain level disable them from leveling up to level 10.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Ohh okay and one question how do i let them gain a level for example my heroe's level is 6 i want them to level up until level 8 and if the hero reach that certain level disable them from leveling up to level 10.
This should do the trick.

Change all instances of 10 to whatever you want the maximum level to be.

Also, change Neutral Hostile to the Computer players so they're excluded from the trigger.

Or, you can add a condition to check for a specific unit or unit-type, like: Triggering unit equal to Paladin 001 or Unit-type of triggering unit equal to Paladin.

  • Example
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Owner of (Triggering unit)) Not equal to Neutral Hostile
      • (Hero level of (Triggering unit)) Greater than or equal to 10
    • Actions
      • Set VariableSet SkillPoints = (Unspent skill points of (Triggering unit))
      • Hero - Set (Triggering unit) Hero-level to 10, Hide level-up graphics
      • Hero - Disable experience gain for (Triggering unit).
      • Hero - Modify unspent skill points of (Triggering unit): Set to SkillPoints points
 
Level 9
Joined
Apr 22, 2020
Messages
430
This should do the trick.

Change all instances of 10 to whatever you want the maximum level to be.

Also, change Neutral Hostile to the Computer players so they're excluded from the trigger.

Or, you can add a condition to check for a specific unit or unit-type, like: Triggering unit equal to Paladin 001 or Unit-type of triggering unit equal to Paladin.

  • Example
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Owner of (Triggering unit)) Not equal to Neutral Hostile
      • (Hero level of (Triggering unit)) Greater than or equal to 10
    • Actions
      • Set VariableSet SkillPoints = (Unspent skill points of (Triggering unit))
      • Hero - Set (Triggering unit) Hero-level to 10, Hide level-up graphics
      • Hero - Disable experience gain for (Triggering unit).
      • Hero - Modify unspent skill points of (Triggering unit): Set to SkillPoints points
Thank you so much and by the way another question how do i make my ai use unspent skillpoints like i have a custom ai hero with custom abilities (by custom abilities i just made those abilities based of the the abilities that are in the world editor) and when my custom ai hero levels up use the unspent skillpoints to level up abilities which are not maxed out.
 
Status
Not open for further replies.
Top