Skip to main content

Scripting Behaviors

Enable Scripting System

Enables or disables the scripting system. For example, dragging and dropping to the scene tree disables script system execution at runtime using a checkbox, and it can be enabled again using the same checkbox.

Property Name Type Description
Enabled bool Enables/disables the scripting system.

Set Script Parameters

This behavior allows users to set public variables of Lua scripts.

  1. The value to set. Lua variables can have the following types:
    • bool
    • int64
    • double (if you have floats in the behavior, cast them to double)
    • char* (a null-terminated character string).
Property Name Type Description
ScriptParameterName FeatStd::String

The name of the script parameter whose value will be set.

NodeWithScript Candera::AbstractNodePointer

Node whose script parameter will be changed.

 

Set Script Property as Animation Property

Binds an Animation to a declared Animation property inside a script's table. The 'PropertyName' has to match the Animation property name in the script and 'Animation' sets the actual Animation value. This Behavior as well as the script need to be placed on the same node. Multiple instances of this Behavior on a node can handle the respective amount of script Animation properties.

Common Properties

Property Name Type Description
PropertyName FeatStd::String The name of the property in the script.
Animation SharedPointer<Candera::Animation::AnimationPlayer> The animation that should be set as the value of the script animation property.