Skip to content
#2786
Auto-translated
Ment
x={15,16,17,18}
y={9,9,10,10}
for i=1 to n
if IsHeroAlive("Erling") then
MoveHero("Erling",x,y,0)
end
end

So, hypothetically speaking. In reality, I see a couple of weak points in the code here (for example, in the event of a battle and victory in it, Erling will most likely not continue moving, as by the time the battle is over, the script will have already finished executing), but the logic is generally like this.

The console displays an error (see screenshot). Here is the code:

x={15,16,17,18}
y={9,9,10,10}
for i=1,n do
if IsHeroAlive(Erling) then
MoveHero(Erling,x,y,0)
end
end
Attachments 1
1 file attached • Total size: 26.3 KB