try replacing MoveHero with MoveHeroRealTime, and remove the CanHeroMove check
more precisely, something like thisif(CanMoveHero(Erling, 15, 9, 0)) then
MoveHero(Erling, 15, 9, 0)
else
MoveHeroRealTime(Erling, 15, 9, 0)
end
No, that won't work. I have a task to defend the castle, so MoveHeroRealTime won't be suitable. 15,9 is the entry point to the castle; this might help.