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

Difference between revisions of "ScriptingSector"

From SuperTux
Jump to: navigation, search
(Add sector scripting docu)
 
 
(4 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
== Methods ==
 
== Methods ==
 
{| class="objectlist"
 
{| class="objectlist"
! class="method" style="vertical-align: top"| float get_ambient_light_red() <br> float get_ambient_light_green() <br> float get_ambient_light_blue()
+
! class="method" style="vertical-align: top"| float get_ambient_light_red() <br /> float get_ambient_light_green() <br /> float get_ambient_light_blue()
 
| Returns the specified channel of the ambient light color.
 
| Returns the specified channel of the ambient light color.
 
|-
 
|-
 
! class="method" style="vertical-align: top"| set_ambient_light(float red, float green, float blue)
 
! class="method" style="vertical-align: top"| set_ambient_light(float red, float green, float blue)
 
| Sets the sector's ambient light to the specified color.
 
| Sets the sector's ambient light to the specified color.
 +
|-
 +
! class="method" style="vertical-align: top"| set_gravity(float gravity)
 +
| Sets the sector's gravity.
 
|}
 
|}
  
Line 20: Line 23:
 
None
 
None
  
 +
{{Navbox Scripting reference}}
 
[[Category:Scripting Reference]]
 
[[Category:Scripting Reference]]

Latest revision as of 09:19, 3 February 2012


Summary

The Sector class provides basic controlling functions for the current sector.

Instances

An instance under sector.settings is available from scripts and the console.

Methods

float get_ambient_light_red()
float get_ambient_light_green()
float get_ambient_light_blue()
Returns the specified channel of the ambient light color.
set_ambient_light(float red, float green, float blue) Sets the sector's ambient light to the specified color.
set_gravity(float gravity) Sets the sector's gravity.

Constants

None

Scripting reference
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