This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

ScriptingCandle

From SuperTux
Revision as of 01:43, 30 June 2006 by AnMaster (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Summary

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

Example

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:

CANDLE1.set_burning(true);

Methods

get_burning() returns true if candle is lighted
set_burning(bool burning) true: light candle, false: extinguish candle

Constants

None