Auto-translated
In general, to add one:a = a + 1
In the case of a loop to check the level, I would do it like this:
a = 1;
while 1 do
sleep(2);
if GetHeroLevel(hero) - a == 1 then
...
end
sleep(2);
a = GetHeroLevel(hero);
end
And for this purpose, there is:Trigger(HERO_LEVELUP_TRIGGER, hero, function)
Thank you :) The function works perfectly in a single case. But what if I need the action to be performed with Each
level up? I apologize for the silly questions, but manipulating comparison signs didn't help.