User Tools

Site Tools


platforms

This is an old revision of the document!


Platforms


In RPG in a Box, tiles can be designated as platforms, giving them the ability to move around the map to new coordinate locations, or “waypoints”. This allows for mechanisms like elevators, lifts, or floating platforms to cross a chasm, river, etc.

To enable this functionality, select the desired tile in the Map Editor and toggle the “Moving Platform” setting to “On” from the Entity Properties panel. Once this option has been enabled, a section will appear with settings for configuring the behavior of the moving platform. The movement speed of platforms is measured in voxel units per second, similar to the movement speed of characters.

Waypoints

A waypoint is a stopping point for a platform, and is defined by a unique name and a coordinate. When a tile has been designated as a moving platform, it will initially have one waypoint named “Default” with the tile's current coordinate. To add a new waypoint, click the “Add” button () to the right of the “Waypoints” header. Each waypoint defined for a particular platform must have a unique name, and its coordinate should be one that is not currently occupied by a tile.

Whenever a platform leaves its current location, any current navigation paths will be disconnected. To minimize the need for scripting after a platform tile has moved to a new waypoint, you can define actions that will connect new navigation paths by clicking the “Add” button () next to the “On Arrival” text (located below a waypoint's name). Once it reaches its destination waypoint, these “On Arrival” actions are used to connect navigation paths to any newly adjacent tiles (for example, to allow the player character to exit an elevator onto another floor, or step off a raft onto the other side of a wide river that was crossed).

For example, when the platform below is moved to the “Upper Floor” waypoint, a navigation path will be automatically connected from its new tile coordinate (8, -3, 16) to adjacent tile coordinate (8, -4, 16) upon arrival, which is a floor tile on an upper dungeon floor that the player character can now step onto from the raised lift.

Scripting

To move a platform to a specific waypoint during game time, you can use the Move Platform scripting function. For example, the script below will move the platform tile (with entity ID of “elevator”) to its “Floor 2” waypoint.

move_platform(entity["elevator"], "Floor 2")
platforms.1576552629.txt.gz · Last modified: 2019/12/16 19:17 by justin