En:OnWorldMapToLevelMap

Материал из Pocket Fallout для КПК на PDA PC PPC Mobile.

Содержание

Syntax

function OnWorldMapToLevelMap(level_location_name : String) : String

Description

Called before hero will go from current worldmap to level location.

Parameters

  • level_location_name - string. Level location name

Result

The function returns level location name (folder name in catalog with name maps\) which is necessary to load. Current function can return null string, if hero stays on worldmap. Data type - String

Example

function OnWorldMapToLevelMap(levelMapName)
 	// x, y - global hero location
 	var x = m_WorldMap.GetWorldHeroX();
 	var y = m_WorldMap.GetWorldHeroY();
 	if m_WorldMap.GetCityNameByCoords(x, y) == "" then
		return "desert";
	endif
	
	if m_WorldMap.GetCityNameByCoords(x, y) == "big" then
		return "default"; 
	endif
	
	return "";
endfunction

See also

Predefined procedures and functions (events)

Личные инструменты