SetHeroLevel

Parameters
whichHero unit

The target hero unit.

level integer

New level of the hero.

showEyeCandy boolean

False to hide level-up effects, true to show. The level-up effects include: floating experience gain text, sound and a visual effect.

comment

Sets the hero to chosen level.

The level can only be increased; lowering the level does nothing. Further, the level will not exceed the hero's maximum level set in WorldEditor.

bug

Making a hero level up using this function (or via other means) will reset the skillpoint modification caused by UnitModifySkillPoints if the amount of skillpoints is beyond the amount of ability levels that can still be learned. See UnitModifySkillPoints.

patch

1.00

Source
common.j
return type
nothing
Source code
native          SetHeroLevel        takes unit whichHero, integer level,  boolean showEyeCandy returns nothing