Script Reference: Actions

Below is the list of actions that can be used in scenarios and scripts.

AddCharacter
Adds a character to a scene.

ChangeScene
Changes the current scene and optionally moves the active character to the new scene.

ClaimBadge
Prompts the player for a nickname, then redirects to the Completion Badge page. Intended to be used when the game is completed.

EndConversation
Ends the specified conversation.

OpenURL
Opens the specified URL. Tenterhook will attempt to spawn a new tab/window automatically. If the attempt is blocked, the user will be prompted to click the URL to spawn the tab/window.

Output
Displays text in the output area. Chunking and randomization are supported.

Pause
Pauses the current script for the specified duration.

PickRandomNumber
Picks a random number between the specified low and high numbers. Intended to be used with the LastRandomNumberBetween test.

RemoveCharacter
Removes a character from the current scene.

RunCharacterAnimation
Runs an animation on the specified character.

RunScript
Stops the currently executing script and runs the specified script.

RunVisualAnimation
Runs an animation on the specified visual.

SetActiveCharacter
Sets the specified character as the active (playable) character. If the specified character is in a different scene, the scene will change accordingly.

SetCharacterScale
Sets the scale of the specified character.

SetCharacterSpritesheet
Sets the active spritesheet of the specified character.

SetCharacterState
Sets the animation state of the specified character.

SetVisualState
Sets the animation state of the specified visual.

ShowDialog
Displays a dialog box with the specified title and message.

ShowNotification
Displays a notification message in the viewport area with an optional sound. Parameters: Message, Duration (milliseconds), Ding

ShowTitle
Display title text for the specified duration.

StartConversation
Launches the specified conversation.

Talk
Causes the specified character to speak.

ToggleCharacterFlag
Toggles a flag on the specified character.

ToggleCharacterPlayable
Toggles the ability for a character to be playable.

ToggleCutScene
Indicates whether a cut scene is active.

ToggleInput
Indicates whether dashboard/scene interaction is enabled.

ToggleInventoryItem
Toggles the existence of an item in the specified character's inventory.

ToggleItemFlag
Toggles a flag on the specified item.

ToggleScene
Toggles the visibility of the current scene. Used when the scene's auto fade-in setting is unchecked.

ToggleSound
Toggles the active state of the specified sound.

ToggleStoryboard
Toggles the active state of the specified storyboard.

ToggleVisual
Toggles the visibility of the specified visual.

ToggleVisualFlag
Toggles a flag on the specified visual.

WalkTo
Walks a character to the specified graph coordinates.

Back to search