Basic FunctionalityInput ManagementTriggerOn this pageTrigger Description: Trigger is a record that defines various input triggers for keyboard keys, gamepad buttons, and joysticks. KeyDown Type: Function. Description: Create a trigger that triggers when all of the specified keys are pressed down. Signature: KeyDown: function(combineKeys: KeyName | {KeyName}): Trigger Parameters: ParameterTypeDescriptioncombineKeysKeyName{KeyName} Returns: Return TypeDescriptionTriggerThe trigger object. KeyUp Type: Function. Description: Create a trigger that triggers when all of the specified keys are pressed down and then any of them is released. Signature: KeyUp: function(combineKeys: KeyName | {KeyName}): Trigger Parameters: ParameterTypeDescriptioncombineKeysKeyName{KeyName} Returns: Return TypeDescriptionTriggerThe trigger object. KeyPressed Type: Function. Description: Create a trigger that triggers when all of the specified keys are being pressed. Signature: KeyPressed: function(combineKeys: KeyName | {KeyName}): Trigger Parameters: ParameterTypeDescriptioncombineKeysKeyName{KeyName} Returns: Return TypeDescriptionTriggerThe trigger object. KeyHold Type: Function. Description: Create a trigger that triggers when a specific key is held down for a specified duration. Signature: KeyHold: function(keyName: KeyName, holdTime: number): Trigger Parameters: ParameterTypeDescriptionkeyNameKeyNameThe key to be checked.holdTimenumberThe duration in seconds. Returns: Return TypeDescriptionTriggerThe trigger object. KeyTimed Type: Function. Description: Create a trigger that triggers when a specific key is pressed within a specified time window. Signature: KeyTimed: function(keyName: KeyName, timeWindow: number): Trigger Parameters: ParameterTypeDescriptionkeyNameKeyNameThe key to be checked.timeWindownumberThe time window in seconds. Returns: Return TypeDescriptionTriggerThe trigger object. KeyDoubleDown Type: Function. Description: Create a trigger that triggers when a specific key is double-pressed within a specified time window. Signature: KeyDoubleDown: function(key: KeyName, threshold?: number): Trigger Parameters: ParameterTypeDescriptionkeyKeyNameThe key to be checked.thresholdnumber[optional] The time window in seconds. Default is 0.3. Returns: Return TypeDescriptionTriggerThe trigger object. AnyKeyPressed Type: Function. Description: Create a trigger that triggers when any key is being pressed down. Signature: AnyKeyPressed: function(): Trigger Returns: Return TypeDescriptionTriggerThe trigger object. ButtonDown Type: Function. Description: Create a trigger that triggers when all of the specified gamepad buttons are pressed down. Signature: ButtonDown: function(combineButtons: ButtonName | {ButtonName}, controllerId?: number): Trigger Parameters: ParameterTypeDescriptioncombineButtonsButtonName{ButtonName}controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. ButtonUp Type: Function. Description: Create a trigger that triggers when all of the specified gamepad buttons are pressed down and then any of them is released. Signature: ButtonUp: function(combineButtons: ButtonName | {ButtonName}, controllerId?: number): Trigger Parameters: ParameterTypeDescriptioncombineButtonsButtonName{ButtonName}controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. ButtonPressed Type: Function. Description: Create a trigger that triggers when all of the specified gamepad buttons are being pressed. Signature: ButtonPressed: function(combineButtons: ButtonName | {ButtonName}, controllerId?: number): Trigger Parameters: ParameterTypeDescriptioncombineButtonsButtonName{ButtonName}controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. ButtonHold Type: Function. Description: Create a trigger that triggers when a specific gamepad button is held down for a specified duration. Signature: ButtonHold: function(buttonName: ButtonName, holdTime: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionbuttonNameButtonNameThe gamepad button to be checked.holdTimenumberThe duration in seconds.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. ButtonTimed Type: Function. Description: Create a trigger that triggers when a specific gamepad button is pressed within a specified time window. Signature: ButtonTimed: function(buttonName: ButtonName, timeWindow: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionbuttonNameButtonNameThe gamepad button to be checked.timeWindownumberThe time window in seconds.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. ButtonDoubleDown Type: Function. Description: Create a trigger that triggers when a specific gamepad button is double-pressed within a specified time window. Signature: ButtonDoubleDown: function(button: ButtonName, threshold?: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionbuttonButtonNameThe gamepad button to be checked.thresholdnumber[optional] The time window in seconds. Default is 0.3.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. AnyButtonPressed Type: Function. Description: Create a trigger that triggers when any gamepad button is being pressed down. Signature: AnyButtonPressed: function(controllerId?: number): Trigger Parameters: ParameterTypeDescriptioncontrollerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. JoyStick Type: Function. Description: Create a trigger that triggers based on joystick movement. Signature: JoyStick: function(joyStickType: JoyStickType, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionjoyStickTypeJoyStickTypeThe type of joystick to be checked.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. JoyStickThreshold Type: Function. Description: Create a trigger that triggers when a joystick moves beyond a specified threshold. Signature: JoyStickThreshold: function(joyStickType: JoyStickType, threshold: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionjoyStickTypeJoyStickTypeThe type of joystick to be checked.thresholdnumberThe threshold value, ranging from 0 to 1.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. JoyStickDirectional Type: Function. Description: Create a trigger that triggers when a joystick is moved in a specific direction within a tolerance angle. Signature: JoyStickDirectional: function(joyStickType: JoyStickType, angle: number, tolerance: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionjoyStickTypeJoyStickTypeThe type of joystick to be checked.anglenumberThe angle of the direction in degrees.tolerancenumberThe tolerance angle in degrees.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. JoyStickRange Type: Function. Description: Create a trigger that triggers when a joystick is within a specified range. Signature: JoyStickRange: function(joyStickType: JoyStickType, minRange: number, maxRange: number, controllerId?: number): Trigger Parameters: ParameterTypeDescriptionjoyStickTypeJoyStickTypeThe type of joystick to be checked.minRangenumberThe minimum range value, ranging from 0 to 1.maxRangenumberThe maximum range value, ranging from 0 to 1.controllerIdnumber[optional] The ID of the gamepad controller. Default is 0. Returns: Return TypeDescriptionTriggerThe trigger object. Sequence Type: Function. Description: Create a trigger that triggers when a sequence of other triggers are completed at the same time. Signature: Sequence: function(triggers: {Trigger}): Trigger Parameters: ParameterTypeDescriptiontriggers{Trigger}The triggers to be checked. Returns: Return TypeDescriptionTriggerThe trigger object. Selector Type: Function. Description: Create a trigger that triggers when any of the specified triggers is completed. Signature: Selector: function(triggers: {Trigger}): Trigger Parameters: ParameterTypeDescriptiontriggers{Trigger}The triggers to be checked. Returns: Return TypeDescriptionTriggerThe trigger object. Block Type: Function. Description: Create a trigger when a sub-trigger is in completed state, it will report canceled state instead for blocking. Signature: Block: function(trigger: Trigger): Trigger Parameters: ParameterTypeDescriptiontriggerTriggerThe trigger to be blocked. Returns: Return TypeDescriptionTriggerThe trigger object.