EnableHeroAI('hero name', nil);2. You need to set a trigger for this action. Something like this:
function func(parameter)
SetObjectPosition('enemy hero name for teleportation', coordinates);
MoveHeroRealTime('this hero', town coordinates);
Trigger(action code, additional parameters, nil);
Trigger(same, but for a duration);
end;
Trigger(action code, additional parameters, func);I can elaborate further if you provide more details about the goal.
---------
How does such a script look in general?
PlayObjectAnimation('monster name', 'move', IDLE);If it involves rotations, there might be problems... The issue now lies with
SetObjectPosition; it theoretically can rotate, but as I clarified, changing the teleportation effect (which we need to eliminate!) only works in 3.1 and only applies to heroes, so I'm not even sure.