1.14.23 - Stairs

Stairs make fancy animations, movements and sounds when the hero takes them.

This type of map entity can be declared in the map data file. It can also be created dynamically with map:create_stairs().

Overview

Stairs are here to provide class transitions between two maps or two layers on the same map, linked by tiles that look like stairs.

They don't provide any fundamental feature: you can already use teletransporters and destinations to make the hero go from a map to another one. And you can use sensors to make him go from a layer to another on the same map. But they add fanciness to these transitions: the sound of climbing or going down stairs, a special movement and appropriate sprite animations.

For stairs that transport the hero to a different map, you still have to use a teletransporter and a destination. Indeed, the stairs are additional, they don't replace teletransporters and destinations. You just have put all three entities (the stairs, a teletransporter and a destination) at the same coordinates and it works.

Stairs that move from a layer to another layer inside the same map work differently. They change this layer automatically for the hero. They must be placed on the lowest one of those two layers.

Stairs are invisible: you are supposed to place appropriate tiles where you make stairs. Their size is always 16x16 pixels.

Methods inherited from map entity

Stairs are particular map entities. Therefore, they inherit all methods from the type map entity.

See Methods of all entity types to know these methods.

Methods of the type stairs

None.

Events inherited from map entity

Events are callback methods automatically called by the engine if you define them.

Stairs are particular map entities. Therefore, they inherit all events from the type map entity.

See Events of all entity types to know these events.

Events of the type stairs

None.