Solarus quests
1.6
Quest maker's reference
|
A crystal block is a colored low wall that may be raised or lowered in the ground.
This type of map entity can be declared in the map data file. It can also be created dynamically with map:create_crystal_block().
An entity of type crystal block is a pattern of size 16x16 pixels that may be repeated horizontally and vertically like a tile.
When they are lowered in the ground, crystal blocks are traversable. When they are raised, they become obstacles. If the hero overlaps them while they get raised, then he can walk on them.
Crystal blocks exists in two colors. One of them is initially lowered and the other is initially raised. The state of crystal blocks is swapped when the hero activates a crystal or when you call map:set_change_crystal_state().
This state persists accross maps of the same world. It is reset when the world changes and when the savegame is reloaded.
Crystals are particular map entities. Therefore, they inherit all methods from the type map entity.
See Methods of all entity types to know these methods.
None.
Events are callback methods automatically called by the engine if you define them.
Crystals 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.