User:Darkid/Sandbox

From Valve Developer Community
< User:Darkid
Revision as of 07:36, 14 July 2012 by Darkid (talk | contribs) (Initial creation. Open to help...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Portal 2 Puzzle Maker

Some portal puzzles may require more complex logic than the game initially allows. The simplest types of logic offered by the game are the NOT gates as well as the AND gates.

NOT gates

NOT gates the simplest type of logic, as they only use one input. These gates are implemented by default, by simply changing whether the target starts enabled or disabled.

text=A NOT gate

AND gates

AND gates are also implemented into the code by default. Whenever two buttons are connected to a single output source, the output source will only enable once both inputs are enabled. A NAND gate can be implemented by flipping the initial state of the output, as per a NOT gate.

text=An AND gate

OR gates

OR gates are the simplest logic not hard-wired into the game. There are two ways of creating an OR gate, one requiring lasers and one not.

Or Gate Logic Lasers.gif
The simpler form of an OR gate simply uses two lasers pointed at a floor-mounted (WHAT IS THIS CALLED). Thus, if either laser is on, the floor (???) is also on. This can then be hooked up to an exit.
Or Gate Logic No Lasers.gif
However, due to the tendency of lasers to lag a game, it may be better to build such a setup without using lasers. This is one of the few gates that is not as easy to create without lasers. In this setup, both inputs are inverted, fed into an AND gate, and the output is then inverted.