Skip to content
#3687
Auto-translated
Guys, sorry, I haven't been on this forum for two days, but I'm still here, and I still need help. I have a question. There is REGION_ENTER_AND_STOP_TRIGGER, which moves objects depending on whether the nearest Castles belong to the first player. Is it possible to add several Castles to this function, or do I need to draw a separate region for each individual object and Castle? That is, I am writing: function Beacon_Tilgatal_F () if GetObjectOwner("Dungeon_1") == 1 then SetObjectPosition("Port_Tilgatal", 81, 133, 0); sleep(1); print("Castle Tilgatal is ours"); sleep(1); else SetObjectPosition("Port_Tilgatal", 127, 142, 1); sleep(1); print("Castle Tilgatal is not ours"); sleep(1); end; end; Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Beacon_Tilgatal_trigger", "Beacon_Tilgatal_F"); And everything is fine here, the object moves to where it needs to. But is it possible to attach other Castles and objects to this trigger, in the same function? How can I do that? That is, attach this to the first snippet: if GetObjectOwner("Dungeon_2") == 1 then SetObjectPosition("Port_Halad", 63, 104, 0); sleep(1); print("Castle Halad is ours"); sleep(1); else SetObjectPosition("Port_Halad", 127, 142, 1); sleep(1); print("Castle Halad is not ours"); sleep(1); And this one? if GetObjectOwner("Dungeon_3") == 1 then SetObjectPosition("Port_Torost", 104, 105, 0); sleep(1); print("Castle Torost is ours"); sleep(1); else SetObjectPosition("Port_Torost", 127, 142, 1); sleep(1); print("Castle Torost is not ours"); sleep(1); P.S. Jewily, I barely managed to figure out the sudden attacks, thank you very much. I haven't figured out the monsters on the map yet, but for now, regions are enough for me.