By the way, that's a smart idea. You could also use GetPlayerFilter(GetObjectOwner(hero)). I think that would even be better.
The thing is, the player filter doesn't match the player number:
1—1
2—2
3—4
4—8
...
That's why I'm against checking GetCurrentPlayer, because heroes can move not only during their turn.
Whether it's fun or not, I did it that way yesterday, because in a multiplayer game, when players move simultaneously, everyone receives the messages. As a result, I came up with this script:
function TeleportFinal(hero, object)
if HasArtefact(hero,53) then
if object == 'TeleportTreeOne' then
SetObjectPosition(hero,51,316,-1,-1)
elseif object == 'TeleportTreeTwo' then
SetObjectPosition(hero,51,291,-1,-1)
end
RemoveArtefact(hero,53)
Trigger (OBJECT_TOUCH_TRIGGER, object, nil)
elseif IsAIPlayer(GetObjectOwner(hero)) then
MessageBoxForPlayers(GetPlayerFilter(GetObjectOwner(hero)),"Maps/Multiplayer/JoyPatriot/Teks/FinalTp.txt", nil)
end
end
SetObjectEnabled("TeleportTreeOne",nil);
SetObjectEnabled("TeleportTreeTwo",nil);
Trigger(OBJECT_TOUCH_TRIGGER,"TeleportTreeOne","TeleportFinal");
Trigger(OBJECT_TOUCH_TRIGGER,"TeleportTreeTwo","TeleportFinal");
P.S
Everything is fine with Owner; for some reason, the website won't let me remove the extra space.