En:BuildMap
Материал из Pocket Fallout для КПК на PDA PC PPC Mobile.
Содержание |
[править]
Syntax
procedure BuildMap(in_map : String)
[править]
Description
Called always on creation/loading of level location. Current procedure should exist anyway! It using for building of level location
[править]
Parameters
- in_map - string. Level location name with which was put an enquiry to loading of current level location. If enquiry was put from worldmap then current parameter is null;
[править]
Result
The pocedure returns nothing;
[править]
Example
procedure BuildMap(in_map)
var m_build = CreateObject("MapBuilder");
m_build.InitLevelMap(40, 40);
m_build.AddTileImage("brda064", 1);
m_build.AddTileImage("brda063", 2);
m_build.AddTileImage("brda062", 3);
m_build.AddTileImage("brdb027", 4);
m_build.AddTileImage("brdb031", 5);
m_build.AddTileImage("tepflr13", 6);
// Random Earth initialisation
dim t_list[5];
t_list[0] = 1;
t_list[1] = 2;
t_list[2] = 3;
t_list[3] = 4;
t_list[4] = 5;
m_build.FillMapTilesByArray(0, 0, 40, 40, t_list, 5, true);
m_build.AddMapViewPort( - 730, 195, 330, 900);
// Look from where us have called
if (in_map == "demo_map") then
m_build.SetHeroPosition(12, 32);
else
// Load music for current location
PlayMusic("17ARROYO");
m_build.SetHeroPosition(19, 38);
endif
m_build.ScrollMapToObject("hero");
m_build.Free();
endprocedure
[править]