Overview
Ever wondered how triggers and logic gates work?
Intro: Triggers & Logic Gates
Hey all! I hope this guide will help you with getting the hang of using triggers and logic gates. Before we step into the examples of how to use them, I will give a quick summary of what they do:
Triggers:
Triggers are designed to turn a object on when the player enters it’s borders, sort of like a tripwire or a motion sensor. There are three types of triggers:
1. “Trigger Once”. This mode will only make the object permanently on or enabled when triggered.
2. “Trigger Multiple”. This will make the object turn on when the player is within the triggers borders, and will turn off when the player exits the triggers border.
3. “Autosave”. Once engaged, it will automatically save that part of the chamber. So if the player dies after he engaged the autosave trigger, the player will respawn to the autosave area instead of starting all over again. Excellent for long or very difficult chambers. And will help so nobody just decides to quit if he has to start all over again.
Logic Gates:
These blocks will allow you to use multiple objects, for example buttons and mega watt pressure buttons, to make an object like a door or fizzler enable or disable.
1. Logic Gate “AND”. This logic gate requires allows you to make a object require two objects to open. It’s pretty useless to me since if you directly plug two objects into the object you need to make open or close, it’s going to act the same as if you used the logic gate. However, their are a handful of uses for this which a couple other guides cover.
2. Logic Gate “OR”. This doesn’t require two+ objects to be on at the same time, you can just use one of the two+ to enable or disable an object.
3. Logic Gate “NOT”. This one is more different than the rest, it will turn an object on if it’s off or an object off if it’s on. This one is designed for more complicated stuff, it is useless for extremely simple logic gate stuff most people will use.
Note: This guide is for triggers and the basics of logic gates. For a in depth view of the flexibility of logic gates, search the portal 2 guides and their will be at least 2 guides about this topic.
Part 1, doors
Perhaps my favorite use of triggers and logic gates is with doors, with triggers you can make a door open or close when the player approaches it automatically.
1. To open a door only one time, put a trigger once object wherever you want the player to open the door at, then connect it to the door itself. Also, don’t forget to make the connection invisible, so you don’t have an antline stoping in the middle of nowhere (I purposely left the antlines in here to demonstrate how the connection works in this picture).
This is great for multiple chambers, and you want the player to be able to still go between both chambers for whatever reason.
2. Now, you might want the door to close and open automatically on both sides of the door, instead of leaving it open. That is easy, just put two Trigger Multiples and a OR logic gate and a door where you need them, then connect them all to the logic gate. This one you have to put one trigger on the block the door is operating on itself, and one on the other side of door so both triggers are touching each other.
3. You might want to leave the door open but also permanently shut it behind the player to fully separate your chambers, this one took me a long time to figure out.
This is where logic gates really come in. First put your 2 trigger blocks (trigger once) and door where you want them. Then put the NOT logic gate wherever as that doesn’t matter where it is. Then you connect them in this order, trigger -> door -> logic gate -> trigger. If you don’t do it in this order then the entire system jams.
Part 2, Draw Bridge
A cool addon that BEE Mod adds is the draw bridge, and I’ve used it multiple times in my chambers and can be very effective for separating one part of your chamber from another.
What’s fun is you can use them in conjunction with triggers and logic gates to make each part of the bridge drop down and pull back up when the player needs to cross the bridge.
Unfortunately, you can’t use drawbridges AND triggers if their are no blocks around, so lets say if I wanted to put the bridges and triggers in the middle of the chamber, I couldn’t do it. PeTi would just give me an error.
Because the bridge is longer than a door, you need lots of Trigger Multiples so the bridge knows where the player is at and do what it was programmed to do.
Put 5 Trigger Multiples across the bridge, then put 2 OR logic gates wherever you need them, then plug two of the triggers from each side of the bridge to one of the logic gates. Then connect the middle trigger to both logic gates. I have not tried one OR logic gate yet instead of two, because I wanted to separate each draw bridge to each logic gate to make things simpler.
So you guys get a full experience of what I’m talking about, I made a test chamber dedicated to this part:
[link]Conclusion
Thank you all for reading my guide. I hope this will help you in your chamber building expertise. Feedback on if this guide was helpful or not would be greatly appreciated.
Here are a couple of chambers I’ve built that use triggers to their full extent (feedback on these will also be greatly appreciated):