API reference index¶
Here you will find detailed information about all the functions, classes and enumerations you can use in your scripts.
Functions¶
Narration
Function | Description |
---|---|
say | Display narration text |
append | Add text to the currently displayed line |
hideText | Hide the text window |
setTextAlign | Set text alignment |
Visuals
Function | Description |
---|---|
setBackground | Change the background image |
scene | Transition to a new scene |
User input
Function | Description |
---|---|
disableSkip | Disable Ctrl functionality
and make blocking transtions
unskippable |
enableSkip | Enable Ctrl functionality
and make blocking transitions
skippable |
disableMouseInput | Disable elements that accept mouse input such as buttons |
enableMouseInput | Enable elements that accept mouse input such as buttions |
getMousePosition | Get the position of the mouse |
setCursor | Change the cursor icon |
setOnRightClick | Specify a function to call when the player presses the right mouse button |
Sound
Function | Description |
---|---|
playMusic | Start playing background music |
fadeInMusic | Start playing background music with a fade |
stopMusic | Stop playing background music |
fadeOutMusic | Stop playing background music with a fade |
playSound | Play a sound |
stopSound | Stop a sound |
Game control
Function | Description |
---|---|
yield | Pause Lua execution until the next frame |
sleep | Pause Lua execution for the specified time |
getDeltaSeconds | Get the number of seconds elapsed since the last execution of Lua |
openScript | Transfer execution to the specified script |
exitGame | Close the game |
saveScreenshot | Save a screenshot of the game to a file |
Caching
Function | Description |
---|---|
precacheImage | Precache the specified image |
Classes¶
Class | Description |
---|---|
Character | A character that can be used for dialogue |
Question | Used to present a choice to the player |
Sprite | An image that can be drawn on the screen |
Button | A button the user can click |
Text | Used to draw text on the screen |
Rectangle | Used to draw a filled rectangle on the screen |
Video | A video player |
CharacterSprite | An image that represents a character |
Cursor | A mouse cursor icon |
ClickableMap | Used to make certain areas of the screen clickable |
Enumerations¶
Enumeration | Description |
---|---|
Position | Used to align text and character sprites on the screen |
Transition | Types of transitions |
Interpolator | Interpolation functions |