Maybe it's not working because of duplicated functions?
I don't understand it myself.
But here's the problem: I have issues with the editor itself. It crashes intermittently when I open the script menu.
And how do I make it so that after reading a message, a hidden hero on the map (who already has an army) teleports to me and a battle begins?
MessageBox("path to the 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.