This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.
Difference between revisions of "ScriptingCandle"
m (Robot: converting/fixing HTML)
(Added "Navbox Scripting reference" template.)
|Line 45:||Line 45:|
Latest revision as of 12:20, 23 January 2010
A Candle object that was given a name can be controlled by scripts.
A Candle is instantiated via a definition in a level. It can be accessed by its name in scripts and via sector.name in the console.
Example of a definition:
(candle (name "CANDLE1") (burning #f) (x 1632) (y 1088) )
The above object will be exposed under the name CANDLE1 in the scripting engine. Example usage:
|get_burning()||returns true if candle is lighted|
|set_burning(bool burning)||true: light candle, false: extinguish candle|
|Ambient sound · Camera · Candle · Display effect · Floating image · Globals · Level · Level time · Path · Platform · Player · Scripted object · Sector · Sound · Text · Thunderstorm · Tilemap · Will-o-wisp · Wind|