Trigger API Reference\DCEI Functions\Map

string GetLevelName()

string GetLevelName()

Description


Returns the published name of the map.

Example Usage

local level_name = DCEI.GetLevelName()
DCEI.LogMessage(level_name)

void PlayLevel(string path, string projectName, string data = null, object usedUnits = null)

void PlayLevel(string path, string projectName, string data = null, object usedUnits = null)

Description


Loads and plays the given map. The map to load must be within the same project.

Parameters

Example Usage

local LEVEL_2_MAP = "Maps/Level2"
local PROJECT_NAME = "Zombie Smasher 3"

Core.Timer.Real.New({
    duration = 3,
    action = function()
        DCEI.PlayLevel(LEVEL_2_MAP, PROJECT_NAME, nil, nil)
    end,
})

string GetPlayLevelData()

string GetPlayLevelData()

Description


Returns the play level data.

Example Usage

local level_data = DCEI.GetPlayLevelData()
DCEI.LogMessage(level_data)