-
-
Notifications
You must be signed in to change notification settings - Fork 491
ScriptingTextArrayObject
SuperTux Bot edited this page Aug 12, 2024
·
4 revisions
This file is auto-generated from the SuperTux source code, using the template ScriptingPage.md.
A TextArrayObject
that was given a name can be controlled by scripts. Supports all functions and variables of Text, applying them to the current text item. If no text item is available, calling functions or using variables of Text (other than set_text()
) will result in an error.
Intended for scripts with narration.
A TextArrayObject
is instantiated by placing a definition inside a level. It can then be accessed by its name from a script or via sector.name
from the console.
This class inherits functions and variables from the following base classes:
Method | Explanation |
---|---|
void clear() |
Clears all text objects from the stack. |
void add_text(string text) |
Adds a text object with a specific text at the end of the stack. |
void add_text_duration(string text, float duration) |
Adds a text object with a specific text and duration at the end of the stack. |
void set_text_index(int index) |
Sets the current text object by its index. |
void set_keep_visible(bool keep_visible) |
If set, keeps the current text object visible. |
void set_fade_transition(bool fade_transition) |
If set, allows for a fade-in and fade-out transition. |
void set_fade_time(float fadetime) |
Sets the fade-in and fade-out time. |
void set_done(bool done) |
If set, sets the text array as finished going through all text objects. |
void set_auto(bool is_auto) |
If set, lets the text array automatically go through all text objects. |
void next_text() |
If available, goes to the next text object in the stack. |
void prev_text() |
If available, goes to the previous text object in the stack. |
Variable | Explanation |
---|---|
bool finished |
Determines whether the text array has finished going through all text objects. |
bool keep_visible |
Determines whether the current text object should be kept visible. |
bool fade_transition |
Allows for a fade-in and fade-out transition. |
None.
Home
Guidelines
Game Mechanics
Tools
Engine
- Cameras in other games
- Collision
- Configuration File
- Console
- Cutscenes
- Game_Engine
- Lighting
- Map_transformer
- Portables
- SceneGraph
- Scripting
Specifications
Milestones
- Milestone 1 Analysis
- Milestone 2 Design Document
- Milestone 2 Design Document Old
- Milestone 3 Design Document
Building (mostly outdated)
- INSTALL.md
- Building
- Building on macOS
- Building SuperTux
- Building on Windows
- Building with MXE (cross-compile)
Meetings