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>
enabled: boolean

If disabled, the Component will stop enacting its behavior.

hoverAudioTrack: AudioTrackAsset
name: string
sceneObject: SceneObject
triggerEndAudioTrack: AudioTrackAsset
triggerStartAudioTrack: AudioTrackAsset
uniqueIdentifier: string
updatePriority: number

Accessors

  • get hoverAudioComponent(): AudioComponent
  • Returns the AudioComponent used for hover feedback for further configuration (such as volume).

    Returns AudioComponent

  • get triggerEndAudioComponent(): AudioComponent
  • Returns the AudioComponent used for trigger end feedback for further configuration (such as volume).

    Returns AudioComponent

  • get triggerStartAudioComponent(): AudioComponent
  • Returns the AudioComponent used for trigger start feedback for further configuration (such as volume).

    Returns AudioComponent

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