Godot Logic Nodes

Node reference

All 11 Logic Nodes, by family. Every node also has the shared Comment, Start Enabled and Trace settings and the Enable and Disable inputs, described in How it works.

Trigger Volume

Triggers · LogicTrigger

A box that fires when something walks into it or out of it. Use it for proximity doors, jump scares, music changes and checkpoints. The activator it passes on is whatever entered or left.

OutputWhen it fires
On Trigger EnterSomething that matches Only Group entered the box.
On Trigger ExitSomething that matches Only Group left the box.
SettingDefaultWhat it does
Size(2, 2, 2)Width, height and depth of the box in meters, centered on the node.
Only Groupgln_playerOnly react to bodies in this group. Leave empty to react to any body.
Collision Masklayer 1Which physics layers it detects.
Volume ColororangeEditor only: tint of the see-through box, so different triggers are easy to tell apart. Never shown in the game.

Only physics bodies set it off, for example a CharacterBody3D or RigidBody3D, and only when they're on a layer in the Collision Mask and in the Only Group group. See Set up your player.

See it used: Proximity door, Delayed spike trap.

Interact Zone

Triggers · LogicInteract

A box where the player presses a key to use something: a lever, a button, a door handle. It also fires on enter and exit, which is handy for showing and hiding a "Press E" prompt.

OutputWhen it fires
On InteractThe interact key was pressed while someone matching Only Group was inside. Activator is whoever pressed it.
On Trigger EnterSomething that matches Only Group entered the box.
On Trigger ExitSomething that matches Only Group left the box.
SettingDefaultWhat it does
Actiongln_interactThe Input Map action that counts as interacting. The plugin adds gln_interact on E when it's enabled.
Size(2, 2, 2)Width, height and depth of the box in meters.
Only Groupgln_playerOnly react to bodies in this group. Leave empty for any body.
Collision Masklayer 1Which physics layers it detects.
Volume ColororangeEditor only: tint of the see-through box.

To use another key, change the action in Project Settings > Input Map, or point Action at one of your own. The node warns you if the action is missing.

Single-player for now

When several bodies are inside at once, the zone only credits the first one. Fine for one player; see Limitations.

See it used: Door with a button, Elevator.

Move

Movers · LogicMove

Slides a node in a straight line between where you placed it (the start) and an offset from there (the end). Use it for sliding doors, elevators, platforms and gates.

InputWhat it does
StartStart moving, or carry on after Stop. Resting at an end, it heads for the other end (in Loop mode, it jumps back to the start first). Ignored while it's already moving.
Go To EndHead for the end, turning back if it's on its way to the start. Already there or on its way: nothing happens.
Go To StartHead for the start, turning back if it's on its way to the end.
StopStop where it is. The next Start carries on in the same direction.
OutputWhen it fires
On Move StartBegan moving.
On Move EndArrived at either end.
SettingDefaultWhat it does
TargetemptyThe node to move. Empty moves this node and everything under it.
Move Offset(0, 0, 0)Where the end is, relative to the start, in meters. Drawn as a cyan line in the editor.
SpaceLocalLocal: along the target's parent's axes, so the move turns with its scene. Best for prefabs. World: along the world's axes, however the scene is turned.
Speed2 m/sMeters per second.
ModeOnceOnce: each Start goes to the other end and stops. Ping Pong: back and forth until Stop. Loop: to the end, jump back to the start, repeat until Stop.
Auto StartoffStart moving as soon as the scene starts, without an Auto node. Ignored while Start Enabled is off.

Start or Go To? Use Start for a button that toggles something back and forth. Use Go To End and Go To Start when a pair of events drives it, like enter and exit, or a Branch's On True and On False. They always mean the same thing, so fast repeated presses can't leave it the wrong way round.

Platforms the player rides: make the moving body an AnimatableBody3D. A moving StaticBody3D slides out from under the player, and the node warns you about it.

See it used: Proximity door, Elevator, Patrolling platform.

Rotate

Movers · LogicRotate

Turns a node between how you placed it and an offset in degrees. Use it for hinged doors, fans, levers and drawbridges.

InputWhat it does
StartStart turning, or carry on after Stop. Resting at an end, it heads for the other end. Ignored while it's already turning.
Go To EndHead for the end, turning back if it's on its way to the start.
Go To StartHead for the start, turning back if it's on its way to the end.
StopStop where it is. The next Start carries on in the same direction.
OutputWhen it fires
On Rotate StartBegan turning.
On Rotate EndArrived at either end.
SettingDefaultWhat it does
TargetemptyThe node to turn. Empty turns this node and everything under it.
Rotate Offset(0, 0, 0)How far to turn, in degrees around X, Y and Z, measured on the target's parent's axes. A door swinging open is usually (0, 90, 0).
Speed90 °/sDegrees per second.
ModeOnceOnce, Ping Pong or Loop, as in Move. A fan is Loop with an offset of (0, 360, 0).
Auto StartoffStart turning as soon as the scene starts. Ignored while Start Enabled is off.

The pivot is the Rotate node's position when the door is its child. For a hinged door, put the Rotate node on the hinge and the door under it. Because the axes are the parent's, a door that was already turned when you placed it still swings the way you'd expect.

See it used: Spinning fan, Three-switch gate.

Auto

Logic · LogicAuto

Fires once when the scene starts, after every other node is ready. Use it to kick off anything that should happen on load: lock a gate, start music, show a message.

OutputWhen it fires
On Scene StartThe scene has started. Activator is always empty.
SettingDefaultWhat it does
Delay0 sExtra seconds to wait after the scene is ready before firing.

For a single Move or Rotate that should run from the start, ticking its Auto Start does the same job without an extra node.

See it used: Spinning fan.

Relay

Logic · LogicRelay

Passes a signal on to everything wired to it, optionally after a delay. Use it to fan one event out to many targets, to add a pause in the middle of a chain, or to make something happen only the first time.

InputWhat it does
TriggerPass the signal on.
Cancel PendingDrop any triggers still waiting on the delay.
OutputWhen it fires
On TriggerFires after Delay seconds.
SettingDefaultWhat it does
Delay0 sSeconds to wait before firing. Adds to each connection's own Delay.
Fire OnceoffOnly ever fire once.

Every Trigger waits its own Delay, so three quick Triggers on a 1 s Relay fire three times, each a second after it arrived. Send Cancel Pending to drop the ones still waiting.

See it used: Delayed spike trap.

Timer

Logic · LogicTimer

Waits a set time, then fires, once or on repeat. Use it for timed doors, countdowns and anything that should happen every few seconds. It pauses when the game is paused.

InputWhat it does
StartStart counting. After Stop, carries on with the time that was left. Ignored if already running.
StopPause and keep the time left. The next Start carries on from there.
RestartStart again from the full Wait Time, whether running or not.
OutputWhen it fires
On TimeoutWait Time ran out. Activator = whoever sent the last Start or Restart.
SettingDefaultWhat it does
Wait Time1 sSeconds until On Timeout.
RepeatoffOff: fire once and stop. On: fire every Wait Time until Stop.
Max Repeats0Only used when Repeat is on. 0 = forever; 3 = fire 3 times, then stop.

See it used: Door that closes by itself.

Counter

Logic · LogicCounter

Counts how many times something happened and fires when it reaches a goal. Use it for "hit three switches to open the gate" puzzles, or anything that should only happen on the Nth time.

InputWhat it does
AddCount up by one.
SubtractCount down by one. Never goes below 0, and does nothing at 0.
ResetGo back to Start Count and start counting again.
OutputWhen it fires
On Count ChangeThe count went up, down or was reset. Handy for a click on each switch.
On Goal ReachedThe count reached Goal. Activator = whoever sent the Add that reached it.
SettingDefaultWhat it does
Goal3Count needed to fire On Goal Reached.
Start Count0Count when the scene loads, and what Reset goes back to.
After GoalStopStop: ignores Add and Subtract until Reset, so it fires once per Reset. Reset: goes straight back to Start Count, so it fires again every Goal adds. Keep Counting: counts past Goal, and fires again only if the count drops below Goal and comes back up.

See it used: Three pressure pads.

Branch

Logic · LogicBranch

Remembers one yes/no fact about the level, like "the power is on", and sends an event one of two ways depending on it. Setting the value and checking it are separate inputs, so one part of the level can flip the switch and another can ask about it later.

InputWhat it does
Set TrueThe value becomes true.
Set FalseThe value becomes false.
ToggleFlip the value.
CheckFire On True or On False for the value right now. Doesn't change the value.
OutputWhen it fires
On TrueCheck was sent and the value is true.
On FalseCheck was sent and the value is false.
On Value ChangeThe value changed (by Set True, Set False or Toggle). Setting it to the value it already has fires nothing.
SettingDefaultWhat it does
Start Valueoff (false)The value when the scene loads.
Check On ChangeoffEvery change also runs Check, so On True and On False fire right away. Use this when something should always show the current value, like a light or a panel.

The value resets to Start Value every time the scene loads. It isn't saved between play sessions.

See it used: Door that needs power, Three-switch gate.

Audio Clip

Feedback · LogicAudioClip

Plays a sound from logic. With Loop off it plays once per Play (a door creak, a click). With Loop on it repeats until Stop (an ambient hum, music).

InputWhat it does
PlayPlay from the start. With Loop on, it then repeats until Stop.
StopStop the sound. Doesn't fire On Audio End.
OutputWhen it fires
On Audio StartPlay started the sound.
On Audio EndA one-shot sound reached its end. Never fires with Loop on.
SettingDefaultWhat it does
StreamemptyThe sound file (.wav, .ogg or .mp3).
LoopoffOff: plays once per Play. On: repeats until Stop. Overrides the file's own Loop import setting, without changing the file.
Volume Db-12 dBLoudness. 0 = the file's own level; every -6 is about half as loud.
Pitch Variation0Each Play picks a random pitch within ± this amount, so repeated sounds don't feel robotic.
PositionalonOn: the sound comes from this node's spot and fades with distance. Off: same volume everywhere (music, announcements).
Max Distance30 mPositional only. Beyond this the sound can't be heard. 0 = no limit.
Polyphony1How many copies can play at once. 1 = Play restarts the sound.
BusMasterThe audio bus it plays on, for separate SFX and Music volume.

For a different sound each time (footsteps, impacts), put an AudioStreamRandomizer in Stream. Place a positional Audio Clip where the sound should come from, for example at the door it belongs to.

See it used: Door that needs power.

Debug

Feedback · LogicDebug

Shows a short message on the game screen when something reaches it, then passes the event on. Drop it into the middle of a chain to see what fired while you play. Repeated messages stack into one line with a count (×3).

InputWhat it does
TriggerShow the message, then fire On Show.
OutputWhen it fires
On ShowThe message was shown. Also fires in a release build, where nothing is shown, so the chain keeps working.
SettingDefaultWhat it does
MessageDebugThe text to show. Empty shows the node's name.
ColoryellowText color, so different checkpoints are easy to tell apart.
Duration3 sSeconds the line stays on screen before it fades.
Show ActivatoroffAdds who set it off, e.g. "Gate open (Player)".
Print To ConsoleoffAlso print the line to the Output panel.
Debug Builds OnlyonShow and print nothing in an exported release game.

You don't need to add anything else to your scene; the on-screen list creates itself the first time a Debug node fires. For a complete log of every input and output instead, turn on Trace.

See it used: Seeing what your logic does.