-
-
Notifications
You must be signed in to change notification settings - Fork 493
ScriptingTileMap
SuperTux Bot edited this page Dec 16, 2024
·
9 revisions
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:
- LayerObject
- GameObject
- PathObject
Method | Explanation |
---|---|
void set_solid(bool solid = true) |
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.
Home
Guidelines
Game Mechanics
Tools
Engine
- Cameras in other games
- Collision
- Configuration File
- Console
- Cutscenes
- Game_Engine
- Lighting
- Map_transformer
- Portables
- SceneGraph
- Scripting
Specifications
Milestones
- Milestone 1 Analysis
- Milestone 2 Design Document
- Milestone 2 Design Document Old
- Milestone 3 Design Document
Building (mostly outdated)
- INSTALL.md
- Building
- Building on macOS
- Building SuperTux
- Building on Windows
- Building with MXE (cross-compile)
Meetings