Godot Logic Nodes

Recipes

Common setups, ready to copy. Each one lists the nodes you need and the connections to make. A line like Trigger On Trigger Enter → Door Move Go To End means: on the Trigger, add a row with My Output On Trigger Enter, Target Door Move and Target Input Go To End.

Most of these are built and labeled in scenes/Sandbox.tscn, if you'd rather take one apart.

Proximity door

Opens when the player walks up, closes when they leave.

Nodes: a Trigger Volume in front of the door; a Move (sliding door) or Rotate (hinged door) with the door under it, Mode Once.

Trigger On Trigger Enter → Door Move Go To End Trigger On Trigger Exit → Door Move Go To Start

Double doors: give each half its own Move with opposite offsets, and add the two rows above for each half.

Door with a button

The player walks up, presses E, and the door opens. Press again to close it.

Nodes: an Interact Zone at the button; a Move or Rotate with the door under it, Mode Once.

Interact Zone On Interact → Door Move Start

Here Start is right: each press means "go the other way". To show a "Press E" prompt, wire the zone's On Trigger Enter and On Trigger Exit to a Move that slides a Label3D into view and back (Go To End and Go To Start).

Elevator

Press E on the platform to ride up; press again to come down.

Nodes: an AnimatableBody3D platform with its collision shape; a Move with the platform as its Target, Move Offset (0, 4, 0), Mode Once; an Interact Zone at a button next to the lift. If the button should ride along, put it under the platform too.

Interact Zone On Interact → Elevator Move Start
Use an AnimatableBody3D

The player only rides a moving platform if it's an AnimatableBody3D. A StaticBody3D slides out from under them, and the Move node shows a warning.

Spinning fan

Turns forever from the moment the level loads.

Nodes: a Rotate with the fan blades under it, Rotate Offset (0, 360, 0), Mode Loop, Auto Start on. No connections needed.

To switch it on later instead, leave Auto Start off and wire whatever turns it on to the Rotate's Start, and whatever turns it off to Stop.

Patrolling platform

Slides back and forth on its own.

Nodes: an AnimatableBody3D platform under a Move, Mode Ping Pong, Auto Start on.

Door that closes by itself

Press the button, the door opens, and five seconds later it closes.

Nodes: an Interact Zone; a Move with the door under it, Mode Once; a Timer with Wait Time 5.

Interact Zone On Interact → Door Move Go To End Interact Zone On Interact → Timer Restart Timer On Timeout → Door Move Go To Start

Restart, not Start: pressing the button again while it's open gives the player the full five seconds again.

Delayed spike trap

The player steps on a plate and spikes shoot up one second later, then sink back.

Nodes: a Trigger Volume on the plate; a Relay with Delay 1; a Move with the spikes under it, Mode Once.

Trigger On Trigger Enter → Relay Trigger Relay On Trigger → Spikes Move Go To End Spikes Move On Move End → Spikes Move Go To Start (Delay 0.5)

The last row waits half a second at the top, then sends the spikes back down. On Move End also fires when they're back at the bottom, but Go To Start does nothing when they're already there, so it doesn't loop. Tick Fire Once on the Relay if the trap should only ever go off one time.

Three pressure pads

A gate opens once the player has stood on all three pads.

Nodes: three Trigger Volumes (one per pad); a Counter with Goal 3; a Move with the gate under it.

Pad 1 On Trigger Enter → Counter Add (Once) Pad 2 On Trigger Enter → Counter Add (Once) Pad 3 On Trigger Enter → Counter Add (Once) Counter On Goal Reached → Gate Move Go To End

The Once on each pad's row stops a player from counting the same pad three times. Add Counter On Count Change → Audio Clip Play for a click on each pad.

Door that needs power

The door only opens after the player turns on the generator. Before that, it buzzes.

Nodes: an Interact Zone at the generator; an Interact Zone at the door; a Branch (Start Value off); a Move with the door under it; an Audio Clip with a buzzer sound.

Generator Zone On Interact → Branch Set True Door Zone On Interact → Branch Check Branch On True → Door Move Start Branch On False → Buzzer Play

Three-switch gate

Three switches, each of which can be on or off. Each switch has a panel that turns to show its state, and the gate is open only while all three are on. This is the combination gate in the Sandbox.

Nodes: per switch, an Interact Zone, a Branch with Check On Change on, and a Rotate holding the panel. Then one Counter (Goal 3, After Goal Keep Counting), one controller Branch (Check On Change on), and a Move for each gate half.

For each of the three switches:

Switch Zone On Interact → Switch Branch Toggle Switch Branch On True → Panel Rotate Go To End Switch Branch On False → Panel Rotate Go To Start Switch Branch On True → Counter Add Switch Branch On False → Counter Subtract Switch Branch On False → Controller Set False

Once, for the gate:

Counter On Goal Reached → Controller Set True Controller On True → Gate Move Go To End Controller On False → Gate Move Go To Start

Any switch going off closes the gate straight away. Keep Counting means the Counter fires On Goal Reached again every time the count climbs back to 3, so the gate reopens when the last switch is turned back on.

Follow the value, not the flips

Wire panels and gates to Go To End and Go To Start from On True and On False, never to Start from On Value Change. A Branch flips instantly, but Start is ignored while the panel is still turning, so fast presses would leave the panel showing the opposite of the real value.