• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Increase stats gain when leveling up?

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Hi all. What I want is to increase the hero's stats gain when leveling up.
For example, hero A should increase his str by 10 when leveling up. But after being equipped with an item, hero A can increase his str by 20 when leveling up. How to do that?
In my map, heros can level up from 1 to 10 by use a single item. So "EVENT_PLAYER_HERO_LEVEL" and the following script do not work accurately. They only work accurately when leveling up 1 level at a time. I hope my awful explanation helps...

JASS:
call SetHeroInt( GetTriggerUnit(),  GetHeroInt(GetTriggerUnit(),false)+R2I(GetHeroInt(GetTriggerUnit(),false) * 0.010)  , true )
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Either you start giving out the level ups in separated instances or just check the heroes lvl shortly after lvl up.
 
Status
Not open for further replies.
Top