Game Development Reference
In-Depth Information
AND Gates, Two True
AND gates output current (or a value of TRUE) only if both inputs are also TRUE. In real
life, this is often used in security systems where two keys must be inserted to open a vault.
You can do something similar to create a secure room, and this can be especially useful in
Multiplayer.Placealeverclosetothedoor(althoughnotsocloseitcandirectly activate it)
and hide a lever in another part of the structure. String them together and feed the output
to the door. Now the obviously placed button won't work unless the hidden lever is also
flipped on.
The AND gate is a more complex construction using three inverters for two inputs and one
output. Figure 9.22 shows the gate with both inputs on, and Figure 9.23 shows the same
with one input off.
FIGURE 9.22 AND gate with both levers switched on. This cuts both torches above the
levers, ensuring no current flows to the inverter on the side of the block. That inverter
therefore sends power to the output wire lighting the lamp.
Search WWH ::




Custom Search