Custom Event

Custom events are functions that allow you to trigger events on other graphs.

Workflow

Definition

To use a custom event, you must first define the custom event.
You can then receive and call the event based on the custom event definition data.
You can also set parameters to be passed in the definition data.

Receive

Next, use the Receive Event Component associated with the custom event definition to receive the event.
If the custom event definition includes parameters, you can output the values ​​of the parameters passed when the event is called.

Invoke

To invoke a custom event, use Invoke Event Action.
If the custom event definition includes parameters, you can enter the values ​​of the parameters you want to pass when the event is invoked.

Objects that can be defined

Logic Controller

You can define custom events directly on objects that contain a Logic Controller, such as Logic Behavior or Logic Asset.
Additionally, by associating an Event Interface Asset, you can receive generic events that are not dependent on the graph object.

For details, see Logic Controller.

Event Interface Asset

Event Interface Asset is an asset that can only set custom event definitions.
Through this asset, you can call generic events that do not depend on the definition of a specific graph object.
By associating it with a Logic Controller, you will be able to receive events.

For more information, see Event Interface Asset.

How to use

Defining custom events

This can be set in the Events tab of the Logic Editor window or in the Inspector window of each object.

  1. Click the “+” button in Event Definitions.
  2. Enter a name and press Enter to confirm.

Defining parameters

Define the parameters to be passed when the event is invoked.

  1. Click the “+” button in the parameter list.
  2. Enter a name and press Enter to confirm.
  3. Click the type drop-down.
  4. Select the type you want to pass from the type selection menu.

Associating an Event Interface Asset

This can be set in the Events tab of the Logic Editor window or in the Inspector window of each object.

  1. Click the “+” button next to Event Interfaces.
  2. Select the Event Interface Asset you want to associate from the menu.
    You can also create a new Event Interface Asset by selecting <Create> from the menu.

Receiving custom events

You must first define a custom event for your graph object.

Node creation menu

  1. On the graph, press the Spacebar to open the node creation menu.
  2. Select the Scripts tab.
  3. Enter Receive Events in the search field.
  4. Select Event Name (Node Type) from the menu.
  5. Enter the node name and confirm with the Enter key.

Drag and Drop

  1. Drag and drop the custom event definition in the Events tab to open the node creation menu.
  2. Select Receive Event (node ​​type) from the menu.
  3. Enter the node name and confirm with the Enter key.

Invoking custom events

You must first define a custom event that can be fired.

Node creation menu

  1. On the graph, press the Spacebar to open the node creation menu.
  2. Select the Scripts tab.
  3. Enter Invoke Events in the search field.
  4. Select Event Name (Node Type) from the menu.
  5. Enter the node name and confirm with the Enter key.

Drag and Drop

  1. Click the lock icon in the top right of the Logic Editor window to lock the selected object.
  2. Select the object you want to invoke.
  3. Drag and drop the custom event definition in the Inspector window to open the node creation menu.
  4. Select Invoke Event (node ​​type) from the menu.
  5. Enter the node name and confirm with Enter.
  6. Unlock the Logic Editor window if necessary.