IO events

Source's IO system allows level designers to quickly and easily change the states of objects and cause things to happen.

Outputs
This first part of an IO event is the output. Something has to happen to an entity, like being spawned, finding an enemy, or getting killed. An example is 's OnTrigger output, which fires whenever an object touches the trigger.

Some special outputs can generate otherwise inaccessible data, and put it in the parameter, unless the mapper does not want this. An example would be OnQueueMoved from, which automatically puts the number of NPCs remaining in the queue into the parameter box. Parameters are discussed more below.

Target
Once an entity is provoked into doing something, it needs another entity to target. Usually this should be a, but it can also be a or a select few special names (listed below). This field can also accept wildcards, which are inserted with. Entities named,  , etc, can all be targeted at once with.

Special names:
 * - The player. Do not use in multiplayer, cause it will only target the first player that connected to the server.
 * - The entity that caused the entire I/O chain. If a player walks into a trigger that fires a, the player is the  of the relay's outputs.
 * - The previous entity in the current I/O chain. If a player walks into a trigger that that fires a, the trigger is the   of the relay's outputs.
 * - The entity from which the current output originates. Equivalent to an entity targeting its own targetname.
 * - Whatever the  is currently looking at. If the player is not currently looking at anything, it picks whatever is closest to being looked at (which sometimes could end up being the player itself).
 * - The entity that the  is looking at due to a  or  choreography event.
 * - In coop, this targets Atlas.
 * - In coop, this targets P-body.
 * - In coop, this targets P-body.

Inputs
Inputs are things that an entity can be told to do. Example: TurnOff on. Some inputs are able to take parameters.

Parameters
Some inputs can take parameters to do different things. Example: SetParent which sets the entity's parent to whatever is in the parameter.

As mentioned above, some outputs do automatically put data into the parameter box (though this is not viewable from the Hammer window). If mappers do not want those parameters, they can override it with something else.

Parameters can also use the special names listed above.

Delay
Simple as that. An amount of time that the game will wait before sending the input.

Fire once
If this is checked, the IO event will only happen once ever. Otherwise, it will happen every time the output fires.