Behaviors > Triggers


Read our article on Custom Events for an explanation of these blocks.


For Actor

Trigger Event in Specific Behavior (for Actor)

trigger event text in behavior text for actor

Triggers the custom event for a specific behavior that is attached to the specified actor.

[ACTOR].say([TEXT], "_customEvent_" + [TEXT]);

Trigger Event in All Behaviors (for Actor)

trigger event text in all behaviors for actor

Triggers the custom event for all behaviors that are attached to the specified actor.

[ACTOR].shout("_customEvent_" + [TEXT]);

For Scene

Trigger Event in Specific Behavior (for Scene)

trigger event text in behavior text for this scene

Triggers the custom event for the specified behavior that is attached to the current scene.

sayToScene([TEXT], "_customEvent_" + [TEXT]);

Trigger Event in All Behaviors (for Scene)

trigger event text in all behaviors for this scene

Triggers the custom event for all behaviors that are attached to the current scene.

shoutToScene("_customEvent_" + [TEXT]);

In This Behavior

Trigger Event (this Behavior)

trigger event text in this behavior

Triggers a custom event in this behavior. This is a direct function call, so an event with the specified name must exist, otherwise it will cause a compilation error.

_customEvent_text();