-
-
Notifications
You must be signed in to change notification settings - Fork 539
ScriptingLevel
__NOTOC__
The Level
class provides basic controlling functions for the current level.
An instance named Level
is available from scripts and the console. (Note: class and eponymous instance might create potential conflicts – the name of one might be changed eventually)
finish(bool win) |
Ends the current level. If you set |
---|---|
spawn(string sectorname, string spawnpointname) |
Respawns Tux in the sector |
flip_vertically() |
Flips the level vertically (i.e. top is now bottom and vice versa). Call again to revert the effect. |
toggle_pause() |
Toggle pause |
Level_edit(bool editing) |
Change to/from edit mode |
None
The following code teleports the player to spawnpoint “main” in sector “underground”.
(scripttrigger
(script
“Level.spawn(\
”underground\
“,`` ``\
”main\
“);]]
”)
(button #f)
...
)
Template:Navbox Scripting reference
Category:Scripting Reference
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