Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
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 thenSetObjectPosition("Port_Tilgatal", 81, 133, 0);sleep(1);print("Castle Tilgatal is ours");sleep(1);elseSetObjectPosition("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 thenSetObjectPosition("Port_Halad", 63, 104, 0);sleep(1);print("Castle Halad is ours");sleep(1);elseSetObjectPosition("Port_Halad", 127, 142, 1);sleep(1);print("Castle Halad is not ours");sleep(1);
And this one?
if GetObjectOwner("Dungeon_3") == 1 thenSetObjectPosition("Port_Torost", 104, 105, 0);sleep(1);print("Castle Torost is ours");sleep(1);elseSetObjectPosition("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.