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

Limit lvl for Hero

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
NO!

You are not making much sense. We are having problems understanding what you are asking.

If you want to limit the level that heroes can be loaded at then add a test to the loading procedure that makes sure the level value is within the required range. If the level value is suddenly outside that range, for example 6 when at most 5 is expected, then either fail the load (cheating?) or clamp the value to 5.

If you want to limit the level the loaded hero can achieve after being loaded then limit it like you would all heroes. This usually involves a trigger on level up that if the maximum level is achieved then it sets experience gain for the unit to 0%, as done by the standard RoC and TFT campaigns. I would also recommend to set the hero level to the level limit to prevent a possible exploit/bug where by a large instantaneous experience gain can cause the unit to gain multiple levels at once and hence exceed the level limit.
 
Status
Not open for further replies.
Top