Transistor-Like Logic
The Patented Quake 2 Logic Gate: by John Fitzgibbons

This basically applies to any situation when you want the player to push a button, spring a trigger, kill a monster or have some other specific event do something, BUT only if a second condition is met at the time of the triggering event. maybe a button is supposed to flood a room, _only_ if all of the doors into the room are closed. Whatever. Here's how to do it.

1. have a button or trigger or whatever that is going to set everything off. this targets the input end of the logic gate, matching the targetname of the target_blaster.

2. give the consequent of this if-then statement, like the func_water in the room-flooding example a targetname matching the target of the shootable button in the output end of the logic gate.

3. the hard part now. Decide what it is you want in the antecedent of the if-then statement, the test variable of this setup. This is what decides whether the output takes place. This needs to be tied to the func_door at the center of the logic-gate. How you do this depends on the test variable. If your test is "only if all doors are closed" as in the room-flooding example, then you want to have a func-door in the logic tube corresponding to each of the real doors in your room. the little doors should have the same targetnames as the real doors, so that whenever they are open, the little doors are open too -- and block the target_blaster from hitting the shootable button. Basically the key here is to set up the little func_doors to mimic the behavior of the test variable, so that they are blocking the logic tube whenever the test conditions are false.

4. one of the cooler applications of this logic gate is to use two of them together to give a single button multiple efects- depending on which test conditions are true, the button does different things. I used this in my level to create an airlock that has a button in the middle. You can never have both doors open; so the button when pushed will close the open door, THEN open the other closed door, then the button will com out for another push. This airlock is the reason i invented the Q2 logic gate, so you don't have too :)

Mail me if you have questions. Isn't this just the coolest thing since jump-lifts?

Here's an example map for the tutorial.

Sumbitted by John Fitzgibbons.

Comments & Questions to
Quake Workshop