Skip to content
#2778
Auto-translated
Gerter
hinders progress = is the required cell inaccessible? Then it's logical that it doesn't move, right?

try something like this:
function ErlingMove()

while 1 do
if(GetCurrentPlayer() == 'player number to which Erling belongs') then
if CanMoveHero(Erling, 15 , 9, 0) then
MoveHero(Erling, 15, 9, 0)
elseif CanMoveHero(Erling, 121, 22, 0) then
MoveHero(Erling, 121, 22,0)
end
end
sleep(2)
end
end

If my hero blocks his path, then he just stands still. This is the only problem. I tried your function, but the problem remains.