Functions (TeaScript)

AudioSet
This function allows you to play sound effects, or play/stop music.

To load a sound effect:

To play a sound effect:

To stop a sound effect:

To play music:

To play music:

EXEScript
This function is used to execute a script. When this function is called, the given script will immediately be executed and the original script will be halted until the execution of the given script completes.

Debug
This function will output a string to the debug box. It will only work in the editor, and will not do anything in game mode. It is recommended to delete these functions after debugging for better performance.

FXCreate
This function is used to create an effect.

HUDSet
This function allows you to draw your own HUD. The function serves different purposes with the first parameter.

To erase previous HUD data and initialize the HUD system:

To disable the custom HUD system and erase all the previous custom HUD data.

To add a bitmap to the HUD: The image source must be in a file called 'scflash.png'.

To add text to the HUD: The image source must be in a file called 'scflash.png'.

LMove
This function is used to move layers.

LSet
This function is used to change the visibility of a layer

To Show/Hide/Toggle a layer:

To change the alpha value of a layer:

LSpin
This function is used to rotate layers. This function only affect NPCs and Blocks.

PlayNote
This function is used to play a note.

ShowMsg
This function shows a message using a message box.

Sleep
This function is used to pause the script for a number of frames. It can only be used in scripts called through an event.

SpEvent
This function is used to trigger special events.

TCreate
This function is used to call an event/create an event timer.

TCreateEx
This function is used to execute a script after the set delay and pass parameters to the said script.

TxtCreate
This function is used to create a text object.