Auto-translated
Ideally, a function like this would allow the hero to continue moving once the obstacle disappears:
function HeroMoveThread(hero, x, y, f)
while 1 do
while not IsPlayerCurrent(GetObjectOwner(hero)) do
sleep()
end
local cx, cy, cf = GetObjectPosition(hero)
if cx == x and cy == y and cf == f then
break
end
MoveHero(hero, x, y, f)
sleep()
end
end
startThread(HeroMoveThread, hero_name, destination_coordinates)
If MoveHero is replaced with MoveHeroRealTime, obstacles will be ignored, but the ignoring will be complete, i.e., if the obstacle is, for example, another hero, there will be no battle with him (although I think this can be fixed, but it will be more complicated).