Auto-translated
Unfortunately, it's not working again. It only moves the first object, Port_Tilgatal, and only when the Castle belongs to the first player or when an enemy captures it. The other two objects are not moved, and no messages are printed.
Thanks for the simplification; I knew there had to be something better than my convoluted code.
Added after 1 hour 58 minutes:
Yes, here it is, the breakthrough! This way, all three work.
```
function Beacon_Tilgatal_F ()
if GetObjectOwner("Dungeon_1") == 1 then
SetObjectPosition("Port_Tilgatal", 81, 132, 0);
sleep(1);
print("Tilgatal Castle is ours");
sleep(1);
elseif (GetObjectOwner("Dungeon_1") ~= 1) then
SetObjectPosition("Port_Tilgatal", 125, 142, 1);
sleep(1);
print("Tilgatal Castle is not ours");
sleep(1);
end;
if GetObjectOwner("Dungeon_2") == 1 then
SetObjectPosition("Port_Halad", 63, 104, 0);
sleep(1);
print("Halad Castle is ours");
sleep(1);
elseif (GetObjectOwner("Dungeon_2") ~= 1) then
SetObjectPosition("Port_Halad", 126, 141, 1);
sleep(1);
print("Halad Castle is not ours");
sleep(1);
end;
if GetObjectOwner("Dungeon_3") == 1 then
SetObjectPosition("Port_Torost", 104, 105, 0);
sleep(1);
print("Torost Castle is ours");
sleep(1);
elseif (GetObjectOwner("Dungeon_3") ~= 1) then
SetObjectPosition("Port_Torost", 126, 143, 1);
sleep(1);
print("Torost Castle is not ours");
sleep(1);
end;
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Beacon_Tilgatal_trigger", "Beacon_Tilgatal_F");
```
Thank you,
Azgalor, I definitely wouldn't have figured it out without you.