Skip to content

LogicCommand

Vicious Squid edited this page Aug 21, 2026 · 3 revisions
image LogicCommand

Runs a console command when triggered


Map logic can drive the debug console through the I/O system. Wire any output (for example a trigger brush's OnTrigger) to this entity's RunCommand input and the command runs as if it had been typed into the console.

Anything the console understands works here — See Console commands for the full list.

The command runs on the main UI thread. The logic thread only queues it — commands touch Qt widgets and editor state, so they are marshalled safely across threads rather than executed inline.


  • The command can come from the input parameter or the Command property

  • Command - the console command line to run when the parameter is blank (default: cam)

  • Disabled - if checked, the entity ignores RunCommand/Trigger and runs nothing

When RunCommand (or Trigger) fires:

  1. If the connection supplies a parameter, that string is used as the command.
  2. Otherwise the entity falls back to its Command property.
  3. If both are blank, nothing runs.

Inputs

Input Description
RunCommand Run a console command. Param: the command line, e.g. cam 2. Blank uses the Command property [string]
Trigger Alias for RunCommand — runs the current command
SetCommand Set the default command string [string]
Enable Allow this entity to run commands
Disable Prevent this entity from running commands

Outputs

Output Description
OnCommand Fired after a command is queued. Param: the command line that was run [string]

Example

Wire a trigger brush so that stepping on it smoothly tweens the camera to first person over two seconds:

TriggerBrush.OnTrigger → CameraCmd.RunCommand   (param: "cam 2")

Or leave the parameter blank and set the entity's Command property to cam 2 instead — both do the same thing. Fire Disable to silence the entity, and Enable to switch it back on.

Clone this wiki locally