User Tools

Site Tools


load_map

Load Map


Loads the specified map and places the player onto the tile at the specified (X,Y,Z) coordinate. The initial direction for the player to face towards is optional. If a direction is not supplied, it will remain unchanged (with a default of south if loading a map for the first time). If the player is already in a map, the screen will fade out and then fade back in once the new map is loaded.

Signature:

load_map(map_name, player_coord, player_direction)
ArgumentDescriptionTypeRequired
map_nameName of the map to load.StringYes
player_coordCoordinate of the tile on which to position the player.CoordinateYes
player_directionCardinal direction to face the player towards.Cardinal DirectionNo

Example:

load_map("Dungeon", coord[2, -3, 1], EAST);

Results: The map with resource name “Dungeon” is loaded and the player is placed onto the tile at coordinate (2, -3, 1) facing east.

Use the Load Map function to launch an initial map from your game's startup script or to link a tile in one map to another (for example, stairs leading down into a dungeon).


Editor Node:

Visual Demo:

load_map.txt · Last modified: 2021/04/21 18:32 by justin