Solarus quests
1.6
Quest maker's reference
|
Dynamic tiles are tiles that can be hidden, shown, created and deleted at runtime.
This type of map entity can be declared in the map data file. It can also be created dynamically with map:create_dynamic_tile().
Dynamic tiles exist because normal tiles are optimized away at runtime. See Tiles are designed for performance for more details.
A typical usage of dynamic tiles is to make appear of disappear parts of the map because something happens: a puzzle is solved, an non-playing characters opens a path for you, water disappears, etc. Use dynamic_tile:set_enabled() to this end.
Dynamic tiles are particular map entities. Therefore, they inherit all methods from the type map entity.
See Methods of all entity types to know these methods.
The following methods are specific to dynamic tiles.
Returns the id of the tile pattern of this dynamic tile.
Returns the id of the tileset of this dynamic tile.
nil
if no tileset is set for the dynamic tile (in this case, the tileset of the map is used).Sets the tileset of this dynamic tile.
tileset_id
(string or nil): The tileset id, or nil
to clear the tileset for the dynamic tile (in this case, the tileset of the map is used).Returns the ground defined by this dynamic tile on the map.
The presence of a dynamic tile can modify the ground of the map. This is determined by the ground property of the tile pattern.
"empty"
means that this dynamic tile does not modify the ground of the map. See map:get_ground() for the list of possible grounds.Events are callback methods automatically called by the engine if you define them.
Dynamic tiles are particular map entities. Therefore, they inherit all events from the type map entity.
See Events of all entity types to know these events.
None.