Well, the problem is, that I need Player to activate those switches "Player in X", because player entering those locations activates and disactivates many different events.
Switches are just an amalgamation of conditions.
For example, if you set A = B and B = C, A = C.
Let's say you have 2 triggers:
If player 1 brings 1 ghost to location 1
then set switch 1
If switch 1 is set
then do action
So why can't you do this?
If player 1 brings 1 ghost to location 1
then do action
Above that I tried to use the "3 trigger option" that was mentioned above, and it worked fine until I realised that there can be only 16 condition in a trigger. This is crucial, because there's about 30 locations on the map, so if I'll run out of place, making second similar trigger for the blocade release start to interfere with the first one switching the blocade to clear, just because player isn't in one of the second 15 locations.
My third recommendation was to remove the locations entirely and use a burrowed/cloaked unit to set/clear the blockade. This is simpler in the long run and is quite expandable without the need to make any additional trigger changes. This is the most logical method and the simplest to trigger. It's obviously not the most optimal, especially if you have detection, however there are ways to get detection of a a player without giving vision and without using a detector (though some units may flicker) so long as you don't use blind.
Additionally, switches are just bits. They're somewhat useful, but infinitely inferior to Deaths of unused units. They can be bits, but they can store additional data, organized into matrices via players, and they can be exclusive (each location is assigned a number rather than a bit, which means that it's impossible to mess up and be in 2 locations at once) which makes troubleshooting easier.
For example, what if you use Deaths of cantina to keep track of where the player is (if you don't want to use that giant location and a bring ghost condition) and deaths of cave to keep track of where the player
was? Note that I'm writing these triggers manually, you may need to edit them to fix them.
Collapsable Box
Trigger("Player 1"){
Conditions:
Bring("Player 1", "Terran Ghost", "Transition - Edge Station to Border Hills", Exactly, 1);
Switch("Transition Blocade", not set);
Deaths("Current Player", "Cantina", exactly, 1); //1 = you are currently in Edge Station
Actions:
Set Deaths("Current Player", "Cave", Set to, 1); //1 = you used to be in Edge Station
Set Deaths("Current Player", "Cantina", Set to, 2); // 2 = you are currently in Border Hills
Move Unit("Player 1", "Terran Ghost", All, "Anywhere", "Transition - Border Hills to Edge Station");
Display Text Message(Always Display, "\x013\x005You're entering the location:\r\n\r\n\x013\x003:: \x004BORDER HILLS \x003::\r\n\r\n\x013\x003Crawlers feeding ground.\r\n\r\n\r\n\r\n\r\n");
Center View("Transition - Border Hills to Edge Station");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Player 1", "Terran Ghost", "Transition - Border Hills to Edge Station", Exactly, 1);
Switch("Transition Blocade", not set);
Deaths("Current Player", "Cantina", exactly, 2); //2 = you are currently in Border Hills
Actions:
Set Deaths("Current Player", "Cave", Set to, 2); //2 = you used to be in Border Hills
Set Deaths("Current Player", "Cantina", Set to, 1); // 1 = you are currently in Edge Station
Set Switch("Transition Blocade", set);
Move Unit("Player 1", "Terran Ghost", All, "Anywhere", "Transition - Edge Station to Border Hills");
Display Text Message(Always Display, "\x013\x005You're entering the location:\r\n\r\n\x013\x003:: \x004EDGE STATION \x003::\r\n\r\n\x013\x003Entrance to the Sphere.\r\n\r\n\r\n\r\n\r\n");
Center View("Transition - Edge Station to Border Hills");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Bring("Player 8", "Zerg Defiler", "Moving Player Location", Exactly, 0); //Put a burrowed defiler at every transition location
Switch("Transition Blocade", set);
Actions:
Comment("Blocade - Border Hills to Edge Station");
Set Switch("Transition Blocade", clear);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Originally I was thinking that figuring out where you were would be useful, and indeed it can be. You can store the blockade switch in that by adding 101 or 102 to the previous location and removing 100 when you're no longer on the location. Travel should only be possible if you're under 100 deaths. Additionally, switches are global, whereas with deaths, you can use "current player" and have each player store their own switches.
There's also a third option for clearing the blockade using a single location: center a location on the unit when the unit is NOT in the location, meaning it's moved, and clear the blockade switch. I would recommend migrating to a death counter blockade though, so you can have varying levels of a blockade: 1= normal blockade. 2= super blockade that can't be removed until you defeat a boss/complete a quest. 0=no blockade.
Hopefully this all makes sense. Let me know if you have any questions.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"