-
Notifications
You must be signed in to change notification settings - Fork 10
Triggers & The I O Logic System
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.
-
Outputs — events an entity fires when something happens to it (e.g. a trigger's
OnTrigger, a monster'sOnDeath, a pickup'sOnPickedUp). -
Inputs — actions an entity can be told to perform (e.g. a door's
Open, a light'sTurnOn, a monster'sKill). - Connections — the links you draw from one entity's output to another entity's input.
A connection reads like a sentence:
When
button.OnTriggerfires → rundoor_main.Openafter0.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.
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.
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.
- Open the Logic Wizard (
Ctrl+Shift+Wor via the Tools menu). - Select a pre-built scenario, then pick which entities fill each role — the wizard generates all the connections for you.
- 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
- Open the Logic Graph (
Ctrl+Lor via the Tools menu). It's a visual node-based editor (you may need to press Refresh). - Drag a wire from an orange Output pin on the source node to a blue Input pin on the target node.
- Right-click the wire to set parameters, like a time delay (e.g. open a door 2 seconds after the trigger is hit).
- Click Apply (or Ctrl+S) to save the connections to the level — changes aren't live until you do.
A quick reference to the most-used I/O. Every type also accepts Hide / Show / ToggleVisibility where it makes sense.
Trigger — outputs: OnTrigger, OnStartTouch, OnEndTouch, OnTeleport · inputs: Enable, Disable, Toggle, TouchTest, Teleport, SetTargetNode
Door — outputs: OnOpen, OnClose, OnFullyOpen, OnFullyClosed, OnLockedUse · inputs: Open, Close, Toggle, Lock, Unlock, SetSpeed
Mover — outputs: 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
ANDgate 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.
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
- Property editor — the I/O tab and per-entity settings
- Logic Graph Editor — visual node wiring
- Logic Entities — the abstract logic Things
- PathNodes — waypoints used by movers, cameras, spawners and teleport triggers