We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: TBD -- Update: Fri 10/20 11pm UTC - We have encountered some unexpected issues. Our staff is working around the clock to complete this process as quickly as possible. Thank you for your patience.

Guide:Logic Gates

From Terraria Wiki
Jump to: navigation, search

To new players or players who have never tinkered with wiring before, logic gates may seem complicated. Logic gates, however are very useful tools in Terraria for anyone wanting to construct advanced wiring creations. This guide assumes you already have basic knowledge of wiring. But, if you don't you can learn more about wiring here.

Basic Logic Gate Functions[edit | edit source]

There are six different kinds of logic gates: AND, OR, NAND, NOR, XOR, and XNOR. The letters represent what the gate does. AND requires all inputs to be true, and OR requires one or more input to be true. 'N' stands for not, which translates to the opposite of, so NAND requires the opposite of some inputs to be true, therefore becoming active as long as not all the inputs are true. NOR triggers when no input is true. 'X' means translates to 'exclusively', so XOR triggers when only one input is true, and XNOR triggers when more than one input is true- or otherwise when the total number of true inputs isn't one, the opposite of XOR.

AND Logic Gate[edit | edit source]

Example of the AND Logic Gate.

There are many things you can do with the AND Logic Gate. The AND Gate reacts only when all inputs are true, so it can be used to restrict access to a particular area unless a player has flipped specific switches throughout the world. It's also great for situations where more than one goal needs to be achieved before a player can move on.

Another use for the AND Gate is wire changing, that is the changing of the color of the wire. AND Gates are useful where one wire color must be used for the input, but another used for the output. A good example is a complicated teleporter hub that needs to be wired to a teleporter where other wires interfere. If you just have one input, the input value and output value will always be the same, (true of false, off or on.)

A third use for AND Gates is for something a player doesn't want happening before other things happen. For example, a player wouldn't want the inner door of their airlock in their underwater base to open before the water was pumped out AND the outer door was closed. Using an AND Gate, the player can wire it to only open the inner door if there isn't any water in the chamber AND the outer door is closed. This can be done using switches, but using the AND Gate, it becomes more streamlined.

OR Logic Gate[edit | edit source]

OR Logic Gates are useful when you want something to happen only after one of the inputs are triggered. For example in an adventure map, if you want players to only select one room, you may wire up an OR Gate to some pressure plates so that once they enter a room, they may still backtrack to the previous room, but not to the rooms they didn't choose.

The big idea with OR Gates is having to make a choice, while at the same time, shutting off other options once that choice has been made. However, OR Gates can be used when the player only has to complete one task, out of many, such as one parkour path out of four, in an adventure map for example. OR Gates can also be useful outside of adventure maps, for instance, if the player wants to wire an OR gate so that when day shifts to night or when an enemy comes into range of your defences, they turn on. This would be useful for discouraging any slimes or other daytime baddies from attacking you.

Guides
 
Basics Walkthrough • Getting started • Practical Tips • Inventory management • Class setups • Mining techniques • Events • Jump Height Comparison
Farming Gardening • Money • Monsters • Chlorophyte • Souls • Biome Keys/Key Molds • Liquids • Renewable Resources
Pre-Hardmode Bosses Mobile only.png Lepus • Mobile only.pngTurkor the Ungrateful • King Slime • Eye of Cthulhu • Eater of Worlds • Brain of Cthulhu • Queen Bee • Skeletron • Wall of Flesh‎
Hardmode Getting Started with Hardmode • Containing the Hallow/Corruption • Lunar Event strategies • Frost Moon strategies • Old One's Army strategies
Hardmode Bosses The Twins • The Destroyer • Skeletron Prime • Plantera • Golem • Console only.pngMobile only.pngOcram • Duke Fishron • Desktop only.png Lunatic Cultist • Desktop only.png Moon Lord
Advanced Dungeon Guardian • Skipping Stones
Building Bases • Base defense • Arena • Wiring (Logic Gates) • Travel • Artificial biomes • Minecarts
Surviving Corruption • Crimson • Ocean • Jungle • Dungeon • Underworld • Hallow • Jungle Temple • Expert Mode
Crafting Crafting 101 • Quick Reference • Cell Phone • Ankh Shield • Terra Blade
Multiplayer Setting up a Terraria server • Setting up Steam Multiplayer • Capture the Gem • PvP