Latest version:
Tramway SDK 0.0.9
Github
Quick links
Home
Get Started

Signals


Signals are Message presets that can be attached to entities.

These can be configured in the level editor, or they can be attached through scripting.

When the appropriate moment comes, the entity will fire off the signal, which in turn will send off the preset message.

Signals are named so as to be confusing to Godot users. Similar frameworks call these the entity input/output system.

Key concepts


Signal type

Each signal has a type. This type determines what kind of action cause the signal to fire.

Any entity can fire off any signal type for any action, but to keep it consistent we have described some signal types.

Signal firing

When the appropriate moment comes, the entity fires off the signal. This causes the signal table to look up all message presets associated with the fired signal type. The signal table will then send off all of the relevant message presets.

While signal message presets can have a value attached to them to be sent as the attached data, during firing the entity can choose to replace the data with something other than what the preset contains.

Signal table

Contains all of the signals that are defined for a certain entity. Can be edited in the level editor. On disk each entity's signals are stored in the Worldcell file.

Signal types


None | NONE

This is not a signal.

Spawn | SPAWN

Fired when an entity is loaded.

Kill | KILL

Fired when an entity is killed.

Activate | ACTIVATE

Fired off when an entity is activated. What is considered an activation depends on the entity type.

Use | USE

Fired when the entity is activated, that is, receives a Activate Once message.

Locked Use | LOCKED_USE

Same as Use, but fired when entity activation fails due to the entity being locked.

Open | OPEN

Fired when the entity begins opening.

Close | CLOSE

Fired when the entity begins closing.

End Open | END_OPEN

Fired when the entity finishes opening.

End Close | END_CLOSE

Fired when the entity finishes closing.

Trigger | TRIGGER

Fired when the entity is triggered.

Enter Trigger | ENTER_TRIGGER

Fired when an entity enters a trigger. Its ID is attached as data in the message.

Exit Trigger | EXIT_TRIGGER

Fired when an entity exits a trigger. Its ID is attached as data in the message.

Progress | PROGRESS

Fired every tick that an entity is progressing. It replaces the message data with a floating point progress value.

If the message type attached to this signal is set to Set Progress, then it is possible to synchronize two entities that support progress.

Last Signal | LAST_SIGNAL

Not actually a signal.