Skip to content
#3689
Auto-translated
Azgalor, no, that won't work; you can't assign Castles and objects in bulk. Different Port objects are associated with different Castles. The first and third Castles can belong to the first player, while the second Castle belongs to someone else. I don't need a check to see if all Castles are joined at once; I need a script that allows different owners to have different Castles, and the positions of the objects change accordingly.

Added 49 minutes ago
I would like something like this:

function Beacon_Tilgatal_F ()
 if (GetObjectOwner("Dungeon_1") == 1) then
  SetObjectPosition("Port_Tilgatal", 81, 133, 0);
  sleep(1);
  print("our Tilgatal Castle");
  sleep(1);

else
if (GetObjectOwner("Dungeon_1") == 2)
 or (GetObjectOwner("Dungeon_1") == 3)
 or (GetObjectOwner("Dungeon_1") == 4)
 or (GetObjectOwner("Dungeon_1") == 5)
 or (GetObjectOwner("Dungeon_1") == 6)
 or (GetObjectOwner("Dungeon_1") == 7)
 or (GetObjectOwner("Dungeon_1") == 8)
 or (GetObjectOwner("Dungeon_1") == 0) then
  SetObjectPosition("Port_Tilgatal", 125, 142, 1);
  sleep(1);
  print("not our Tilgatal Castle");
  sleep(1);

 else
  print("somehow need to attach the second Castle here");
 sleep(1);
 end;
  end;
   end;

   Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Beacon_Tilgatal_trigger", "Beacon_Tilgatal_F");

But it doesn't work at all.