Skip to main content
Legacy API (Deprecated)

Event Types

Deprecated

This page describes the legacy API, which is deprecated since 2.0 and will be removed in a future major version. Use Gameplay Tag Events instead. See Migrating to Gameplay Tag Events.

Gameplay Tag events​

Register Event and Invoke Event use a Gameplay Tag as identifier and send any struct as payload, so a single pair of nodes covers every kind of data. This is the recommended way for new projects. See Gameplay Tag Events.

Typed events​

The typed events each carry one fixed kind of data. Every type has its own Register and Invoke nodes, in an identifier version and a Name version.

TypeRegister nodeInvoke nodeData sentCallback receives
SimpleRegister Simple EventInvoke Simple Eventnothingnothing
PayloadRegister Payload EventInvoke Payload EventPayload (Object)Payload (Object)
StringRegister String EventInvoke String EventStringString
IntRegister Int EventInvoke Int EventValue (Integer)Value (Integer)
FloatRegister Float EventInvoke Float EventValue (Float)Value (Float)
BoolRegister Bool EventInvoke Bool EventValue (Boolean)Value (Boolean)
VectorRegister Vector EventInvoke Vector EventData (Vector)Data (Vector)
String + FloatRegister String Float EventInvoke String Float EventData (StringFloat struct)Data with String and Float
String + IntRegister String Int EventInvoke String Int EventData (StringInt struct)Data with String and Value

Use Make StringFloat / Make StringInt to build the struct when invoking, and Break to read it in the callback.

Example: an Int event​

The callback gets one pin for the data, here Value. The sender passes the value to the same pin on the Invoke node.

Register Int Event Name with ScoreChanged, a callback that prints Value, and Invoke Int Event Name with the Score variable

Example: a String + Float event​

Break Data in the callback, and build it with Make StringFloat when invoking.

Register String Float Event Name with Damage, a callback that breaks Data into String and Float, and Invoke String Float Event Name with Make StringFloat

The type must match​

A typed listener is only called when the event is invoked with the same type it was registered with. If you register MyEvent as an Int event and invoke it with Invoke Float Event, nothing is called, and this warning is written to the log:

Event (MyEvent) was invoked as Float but no listener is registered with that type

Registering the same identifier with two different types also logs a warning. Use one type per event.

Need more data?​

If none of the built-in types fit, send an object with a Payload event. The object can hold any variables you need.