Skip to content

Navigation Menu

Sign in
Sign up

Triggers & The I O Logic System

Vicious Squid edited this page Aug 21, 2026 · 8 revisions

Fio uses a powerful Input/Output (I/O) event system, inspired by the Half-Life 2 / Source "Hammer" editor, that lets you chain actions together without writing any code. Almost every object in a level — brushes, Things and Logic Entities — can send and receive signals.

The three building blocks

  • Outputsevents an entity fires when something happens to it (e.g. a trigger's OnTrigger, a monster's OnDeath, a pickup's OnPickedUp).
  • Inputsactions an entity can be told to perform (e.g. a door's Open, a light's TurnOn, a monster's Kill).
  • Connections — the links you draw from one entity's output to another entity's input.

A connection reads like a sentence:

When button.OnTrigger fires → run door_main.Open after 0.5s.

Each connection stores five things:

Field Meaning
Output The event on the source entity that starts it
Target The entity that receives the signal (matched by UUID, falling back to name)
Input The action to run on the target
Parameter Optional value passed to the input (e.g. a brightness, a colour, a command line)
Delay Seconds to wait before running the input

There is also a Fire Once flag: a fire-once connection runs a single time and is then skipped forever, which is perfect for one-shot events like an ambush or an intro sequence.

Because targets are addressed by their stable UUID, a connection keeps working even after you rename the target entity. The Property editor shows a Targeted by line so you can always see what points at a given entity.


What is a Trigger?

A trigger is an invisible volume of space (created by drawing a brush and checking Is Trigger in the Property editor). It waits for the player to touch it — or for another entity to send it a signal — and then fires its outputs.

  • Inputs: actions the trigger can receive (e.g. Enable, Disable, Toggle).
  • Outputs: events the trigger fires (e.g. OnTrigger, OnStartTouch, OnEndTouch).

Triggers can also be set to hurt the player or teleport them to a PathNode instead of (or as well as) firing I/O — see the Trigger tab on the Property editor page.


How to wire a Brush or Entity

There are three ways to create connections. They all edit the same data, so you can start in the wizard and fine-tune in the graph.

Method 1: The Property editor 'I/O' tab

Select the source entity, open its ⚡ I/O tab, and click Add. Choose My Output, the Target entity, its Input, an optional Parameter and Delay, then confirm. The valid inputs for the target fill in automatically. This is the most direct, precise method.

Method 2: The Logic Wizard

  1. Open the Logic Wizard (Ctrl+Shift+W or via the Tools menu).
  2. Select a pre-built scenario, then pick which entities fill each role — the wizard generates all the connections for you.
  3. Built-in scenarios are grouped into four categories:
    • Monster Encounters — Locked Room, Alarm System, Chain Reaction, Death Trap, Kill the Lights, Timed Patrol, Ambush Swarm
    • Doors & Movers — Button Door, Timed Door, Locked Door Hint, Pickup Unlocks Path, Elevator, Light Switch, Respawning Pickup
    • Environment & Audio — Flickering Light, Ambient Soundscape, Trap Corridor, Scripted Reveal, Timed Hazard
    • Complex Logic — Arena Battle, Security System, Puzzle Door (Multi-Switch), Gauntlet Sequence, Level Exit Sequence, Relay Chain, Disable on Trigger

Method 3: The Logic Graph Editor

  1. Open the Logic Graph (Ctrl+L or via the Tools menu). It's a visual node-based editor (you may need to press Refresh).
  2. Drag a wire from an orange Output pin on the source node to a blue Input pin on the target node.
  3. Right-click the wire to set parameters, like a time delay (e.g. open a door 2 seconds after the trigger is hit).
  4. Click Apply (or Ctrl+S) to save the connections to the level — changes aren't live until you do.

Common outputs & inputs by entity type

A quick reference to the most-used I/O. Every type also accepts Hide / Show / ToggleVisibility where it makes sense.

Triggeroutputs: OnTrigger, OnStartTouch, OnEndTouch, OnTeleport · inputs: Enable, Disable, Toggle, TouchTest, Teleport, SetTargetNode

Dooroutputs: OnOpen, OnClose, OnFullyOpen, OnFullyClosed, OnLockedUse · inputs: Open, Close, Toggle, Lock, Unlock, SetSpeed

Moveroutputs: OnFullyOpen, OnFullyClosed, OnPathNodeReached · inputs: Open, Close, Toggle, SetPosition, SetSpeed, FollowPath, StopPath

Light outputs: OnTurnedOn, OnTurnedOff, OnShadowsEnabled/Disabled · inputs: TurnOn, TurnOff, Toggle, SetBrightness, SetColor, FadeIn, FadeOut, EnableShadows

Speaker outputs: OnSoundStarted, OnSoundFinished · inputs: PlaySound, StopSound, Toggle, SetVolume

Monster outputs: OnDeath, OnDamaged, OnSeePlayer, OnLostPlayer, OnAttack · inputs: Enable, Disable, Kill, SetTarget, Wake

Pickup outputs: OnPickedUp, OnRespawn · inputs: Enable, Disable, Respawn, SetValue

Player Start outputs: OnPlayerSpawn, OnPlayerDeath

LevelChanger outputs: OnUse · inputs: Trigger, ChangeLevel

Portal outputs: OnEnabled, OnDisabled, OnTeleport, OnPlayerEnter · inputs: Enable, Disable, Toggle, SetTarget

PathNode outputs: OnMonsterArrived, OnMonsterLeft, OnWaitStart, OnWaitEnd · inputs: Enable, Disable, Toggle

(See each entity's own wiki page, or the entity's I/O tab, for the complete list.)


Dedicated Logic Entities

For more complex setups, right-click the 2D view and spawn abstract logic "Things" that shape the signal flow. Full details on the Logic Entities page — in brief:

  • LogicRelay — chain multiple events together or centralise a single trigger action (and enable/disable a whole chain at once).
  • LogicGate — require several inputs before firing (e.g. an AND gate that needs three switches before a boss door opens).
  • LogicTimer — fire an event once or on a repeating interval (flickering lights, crushing traps).
  • LogicCommand — run a debug-console command from map logic.
  • LogicCamera — play a cinematic camera move along a PathNode chain.
  • LogicSpawner — spawn entities at a PathNode when triggered.
  • LogicKeyValueStore — store values that persist across level changes.

Testing & debugging

You can fire connections by hand and inspect them from the Debug Console / Console commands:

  • ent_fire <entity> <input> [param] — run an input directly
  • outputs <entity> / inputs <entity> — list the I/O available on an entity
  • connections <entity> — show the connections leaving an entity
  • connect <src> <out> <tgt> <in> [delay] / disconnect ... — add or remove connections live

See also

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /