Nuclide
Software Development Kit for id Technology (BETA)
I/O System

Flexible system to control entities within all areas of the game.

Flexible system to control entities within all areas of the game.

The I/O System is the primary way in which game objects interact with one another. To understand how it works, let's understand first where we came from.

History

Simple triggers in Quake (1996) worked in a straightforward manner. Entities identify themselves with a targetname key that the level designer assigns, and only then can they be triggered by another entity - most commonly a trigger_once or a trigger_multiple - which targets them in return using a target key with the value being the name of the entity that is to be triggered.

You can still use this very basic way of interacting with objects.

Later, in Half-Life (1998) the system was extended with trigger_relay and its ability to suggest a desired entity state. One of three can be chosen: On, Off, Toggle.

Entities like multi_manager came about in order to handle complex tasks that should have be simpler to pull off, such as triggering multiple entities at the same time - making it apparent that a newer system would be needed to handle the growing complexities in later games.

The I/O system as it is implemented in Nuclide aims to be compatible with how it was first used in Half-Life 2 (2004).

Usage

As you did before, your entities and triggers will still want to identify themselves with a targetname key. However, you will no longer set target key, you will specify an Output instead.

For example, a func_button would now use a key named OnPressed and the value should be a string in the following format:

TargetName,NameOfInput,OptionalDataString,DelayInSeconds,NumUses

Whereas the output value segments are one of the following:

Note
Read the entity documentation for the entites you would like to trigger, and read about the Inputs they expose.

You can also have duplicate outputs set. Yes**, unlike regular keys, in the special case of Outputs you can have multiple keys named OnPressed within a single entity definition, however most level editors are not aware of this. Our recommendation is you patch your level editor software to never merge any entity keys that start with the case-sensitive characters On. All Outputs in Source start like this, so it should be deemed a standard.