Skip to content

Class: ScriptTriggerRequest<T>

ScriptTriggerRequest contains all information for triggering a script to execute. This includes the name of the script, a descriptor of how it was triggered, any entity associated with the script, and any arbitrary data to expose to the script.

Type parameters

Name
T

Table of contents

Constructors

Properties

Constructors

constructor

+ new ScriptTriggerRequest<T>(name: string, descriptor: string, entity?: IEntity, data?: T): ScriptTriggerRequest<T>

Type parameters:

Name
T

Parameters:

Name Type
name string
descriptor string
entity? IEntity
data? T

Returns: ScriptTriggerRequest<T>

Properties

data

Optional data: undefined | T

Any arbitrary data to expose to the script.


descriptor

descriptor: string

Descriptor of the conditions the script was executed under, e.g. "update"/"collision"


entity

Optional entity: undefined | IEntity

Any entity associated with the execution of the script.


name

name: string

Name of the script to execute.


MESSAGE_TRIGGER_SCRIPT

Readonly Static MESSAGE_TRIGGER_SCRIPT: trigger_script= "trigger_script"