Skip to content
#2776
Auto-translated
Gerter
First, you should disable the AI for the hero. Second, it's better to create a separate function that will check if the turn of the desired player has arrived and then start moving the hero, because the trigger for a new day is not quite suitable for this.

Even so, if something prevents him from moving, he will now just stand still. I wrote the function using startThread:
function ErlingMove()
local x, y = 15, 9
if CanMoveHero(Erling, x, y, 0) then
MoveHero(Erling, x, y, 0)
end
end