Auto-translated
Hello forum again. Maybe someone can tell me how to add one to a variable? I mean, I'm running a loop with a check to see if my variable has changed by "+1" (in my case, this is GetHeroLevel). However, the game doesn't react at all, as if there's a syntax error.
In general, to add one:
a = a + 1In the case of a loop checking 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);
endAnd for this purpose, there is:
Trigger(HERO_LEVELUP_TRIGGER, hero, function)