Binds scripts to Events and executes them when triggered. Any script can access the ScriptComponent executing them through the variable script. See also: Scripting Overview, Script Events Guide.

// Bind a function to the MouthOpened event
function onMouthOpen(eventData)
{
print("mouth was opened");
}
var event = script.createEvent("MouthOpenedEvent");
event.bind(onMouthOpen);

Hierarchy (view full)

Constructors

Properties

api: Record<string, any>
duration: number = 0.033
enabled: boolean

If disabled, the Component will stop enacting its behavior.

name: string
sceneObject: SceneObject
uniqueIdentifier: string
updatePriority: number

Accessors

  • get axisBufferDegrees(): vec3
  • Returns vec3

    the vector defining the buffer for each axis.

  • set axisBufferDegrees(bufferDegrees): void
  • Parameters

    • bufferDegrees: vec3

      the vector defining the buffer for each axis.

    Returns void

  • get axisEasing(): vec3
  • Returns vec3

    the vector defining the easing for each axis.

  • set axisEasing(easing): void
  • Parameters

    • easing: vec3

      the vector defining the easing for each axis. For instant follow, use easing = (1,1,1).

    Returns void

  • get xAxisEnabled(): boolean
  • Returns boolean

    if the SceneObject billboards about the x-axis.

  • set xAxisEnabled(enabled): void
  • Parameters

    • enabled: boolean

      defines if the SceneObject billboards about the x-axis.

    Returns void

  • get yAxisEnabled(): boolean
  • Returns boolean

    if the SceneObject billboards about the y-axis.

  • set yAxisEnabled(enabled): void
  • Parameters

    • enabled: boolean

      defines if the SceneObject billboards about the y-axis.

    Returns void

  • get zAxisEnabled(): boolean
  • Returns boolean

    if the SceneObject billboards about the z-axis.

  • set zAxisEnabled(enabled): void
  • Parameters

    • enabled: boolean

      defines if the SceneObject billboards about the z-axis.

    Returns void

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Returns void

  • Immediately resets the SceneObject to the rotation accroding to inputs regardless of easing.

    Returns void