2D Controllers

2 controllers available for 2D workflows.

◷ 3 min read Phase 5 enhanced
Guidance panels
Source of truth This page lists only bricks registered by the uploaded addon. Legacy aliases and compatibility script shims are not presented as separate menu entries.
Chapter guide

How controllers fit into a chain

Controllers decide whether connected sensor results are allowed to continue. They keep conditions separate from the actions that follow.

  1. Connect one or more Sensors.
  2. Choose the logic mode or script module.
  3. Connect the Controller output to the Actuators that should run.
controller • 2d

Controller

3D 2D UI

AND: all connected sensors must be active OR: any connected sensor must be active NAND: NOT all sensors active (fires unless all are true) NOR: NO sensors active (fires only when all are false) XOR: exactly one sensor is active

Menu Add Logic Brick → Controllers
Source controllers/controller.gd

Options

Property Details
logic_mode Logic Mode
Choices: AND,OR,NAND,NOR,XOR
Default: and
all_states All States
Default: false
state_id State Id
Choices: __STATE_LIST__
Using this brick

Typical uses

  • Combine one or more sensor results before actuators run.
  • Keep decision-making separate from the actions that follow.
  • Switch between AND, OR, NAND, NOR, and XOR without adding separate controller bricks.

Example chain

One or more sensors Controller Choose an actuator
Tip Use AND when every connected condition must be true, and OR when any connected condition may continue the chain.
Common mistake Do not create separate bricks for AND, OR, NAND, NOR, or XOR; choose the mode inside the Controller brick.
Controller screenshot placeholder
Controller screenshot
controller • 2d

Script Controller

3D 2D UI

Works like UPBGE's Python Controller (module mode): - Point to a .gd file - That file defines a top-level function: func run(node: Node) -> void: - When the sensor fires, run(node) is called — node is the scene object Example script (my_script.gd): func run(node: Node) -> void: node.health -= 10 print("Health: ", node.health) The script does NOT need extends — it is called as a module, not instantiated.

Menu Add Logic Brick → Controllers
Source controllers/script_controller.gd

Options

Property Details
logic_mode Logic Mode
Choices: AND,OR,NAND,NOR,XOR
Default: and
script_path Script Path
Choices: *.gd
all_states All States
Default: false
state_id State Id
Choices: __STATE_LIST__
Using this brick

Typical uses

  • Combine one or more sensor results before actuators run.
  • Keep decision-making separate from the actions that follow.
  • Call a small reusable GDScript module when visual logic needs custom behavior.

Example chain

One or more sensors Script Controller Choose an actuator
Tip Keep the module function small and focused, and test its file path before connecting it to a larger chain.
Common mistake The module script must expose the function format described above; it is not used like a normal node script.
Script Controller screenshot placeholder
Script Controller screenshot