MapManager

Handles loading and unloading maps.

About

This is a global object that can always be accessed.

Usage

GetMapManager:SetActiveMapByName("Main");

Member Functions

LoadMapByName

boolean LoadMapByName(string mapName)

Loading a Map causes the entire thing to be preloaded into memory.

In the future, you will be able to also enable map-streaming.  (load as you go)

Note

There is no “Save Map” command because Map’s are automatically saved when changes are made, unless the map has requested otherwise.  See Map::SetAutoSave.

Parameters

mapNameThe name of the map directory you want to load.

Returns

True if the map was found and loaded successfully.

UnloadMapByName

nil UnloadMapByName(string mapName)

Unload a Map causes all resources associated with it to be freed.

Parameters

mapNameThe name of the map directory you want to unload.

SetActiveMapByName

boolean SetActiveMapByName(string mapName)

Causes a Map to receive “focus” and be shown on the screen.

Parameters

mapNameThe name of the map you want the Camera to focus on.

Returns

True if the Map was made active successfully.

GetActiveMap

Map GetActiveMap()

Returns

A Map object interface of the Map currently being displayed.

A map is a single area that can be any size and contain any amount of tiles, including Entities and TilePic’s.
Controls what part of the world is currently on the screen, and at what zoom level.