This file is auto-generated from the SuperTux source code, using the template ScriptingPage.md.
A TileMap
that was given a name can be controlled by scripts. The tilemap can be moved by specifying a path for it.
A TileMap
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.
This class inherits functions and variables from the following base classes:
Method | Explanation |
---|---|
void set_solid(bool solid) |
Switches the tilemap's real solidity to solid . |
bool get_solid() |
Returns the effective solidity of the tilemap. |
int get_tile_id(int x, int y) |
Returns the ID of the tile at the given coordinates or 0 if out of bounds. |
int get_tile_id_at(float x, float y) |
Returns the ID of the tile at the given position (in world coordinates). |
void change(int x, int y, int newtile) |
Changes the tile at the given coordinates to newtile . |
void change_at(float x, float y, int newtile) |
Changes the tile at the given position (in-world coordinates) to newtile . |
void change_all(int oldtile, int newtile) |
Changes all tiles with the given ID. |
void fade(float alpha, float time) |
Starts fading the tilemap to the opacity given by alpha . |
void tint_fade(float time, float red, float green, float blue, float alpha) |
Starts fading the tilemap to tint given by RGBA. |
void set_alpha(float alpha) |
Instantly switches the tilemap's opacity to alpha . |
float get_alpha() |
Returns the tilemap's opacity. |
Variable | Explanation |
---|---|
bool solid |
Equivalent to get_solid() and set_solid() . |
float alpha |
Determines the tilemap's current opacity.requested tilemap opacity |
None.