Skip to content

ScriptingLevelTime

SuperTux Bot edited this page Aug 12, 2024 · 7 revisions

This file is auto-generated from the SuperTux source code, using the template ScriptingPage.md.

Summary

A LevelTime that was given a name can be controlled by scripts.

Instances

A LevelTime 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.

Inheritance

This class inherits functions and variables from the following base classes:

Methods

Method Explanation
void start() Resumes the countdown (assuming it isn't already started, in which case it does nothing).
void stop() Pauses the countdown (assuming it isn't already stopped, in which case it does nothing).
float get_time() Returns the number of seconds left on the clock.
void set_time(float time_left) Sets the number of seconds left on the clock.

Variables

Variable Explanation
float time The number of seconds left on the clock.

Constants

None.

Clone this wiki locally