Auto-translated
It's better not to duplicate.
Well, it's better to understand. Maybe you can provide the entire script? Check the console to see what it outputs...
You're lucky; it always crashed for me... Edit the scripts with Notepad or a dedicated script editor if it bothers you again.
Read about the MessageBox and SetObjectPosition functions in the manual. It's not complicated.
MessageBox("path to message", TeleporateHero);
function TeleporateHero()
SetObjectPosition("script name of the enemy hero", x coordinate, y coordinate, on the surface or in the Dungeon);
MakeHeroInteractWithObject("script name of the enemy hero", "script name of your hero");
end;
You can read more about the MessageBox and SetObjectPosition functions in the manual.
Regarding my question, I don't know what it was. I restored a backup of the map, and everything works there. Apparently, I messed something up somewhere. Oh well...
And how do I prevent them from being duplicated? I have no idea how to make a defeat occur when one of the three heroes dies in a single function.