Configurator Example
An example of how to bind runtime gameplay logic to Configurator driven events.
Configurator Example
This example walks through the steps of binding runtime gameplay logic to Configurator events inside the World Blueprint. The world blueprint is used as an example, but any other blueprint class will work.
Getting Started
On BeginPlay, grab reference to the OdysseyConfiguratorServerSubsystem
Call Register State Changes Listener to register your delegate
Create the delegate binding by dragging out of the On Event Delegate pin. Select 'Add Custom Event' when prompted.
The exec pin of your new event will be fired on every Configurator update
Example usage
Split Event Data struct pin
Drag out of Event Data Key and select Switch on Configurator Event Key
Select the new node and assign a Configurator asset to it
In the case of a string Configurator property, the Event Data Value can be passed directly to a consuming object. In this case, we are going to assign the string to an in-world Text Render actor.
Same applies to number properties
Enum Configurator values are easy to work with thanks to the Switch on Configurator enum value node. After the node it's added to the blueprint, it needs to have a Key specified in its settings.
Reacting to an Image event type is also easy. The Event Data Value can be linked to a Get Image From URL node.
The bound delegate will fire once the file is downloaded and turned into a runtime texture.
Trigger events are the easiest, as they do not carry any value. These can be used to fire off preconfigured, non-parametrized events. An example of such an event is a preset fireworks display.
Updated about 1 month ago