Difference between revisions of "Legacy:Functions/Map"

From Spherical
Jump to: navigation, search
(Cleanup)
m (Maps: rename section)
Line 39: Line 39:
 
* [[API:SetDelayScript|SetDelayScript]](''frames'', ''script''): Run ''script'' after ''frames'' delay.
 
* [[API:SetDelayScript|SetDelayScript]](''frames'', ''script''): Run ''script'' after ''frames'' delay.
  
=== Maps ===
+
=== Map Elements ===
  
 
{{API:Functions/Map/Zones}}
 
{{API:Functions/Map/Zones}}

Revision as of 23:32, 8 June 2013

Map and map engine control

  • MapEngine(map_filename, fps): Start the map engine at map_filename at speed fps.
  • GetCurrentMap(): Get the filename of the loaded map.
  • ChangeMap(map_filename): Change the current map of the map engine.
  • IsMapEngineRunning(): Check if the map engine is running or not.
  • UpdateMapEngine(): Update state of map entities, animations and events in map engine.
  • ExitMapEngine(): Flag the map engine to exit on the next update.

Map object

  • Sphere Map object: Holds map data.

Map scripts

  • SetRenderScript(script): Set script to run after each time the map is drawn.
  • SetUpdateScript(script): Set script to run after each map engine update.
  • CallMapScript(map_event): Call map script associated with the current map.
  • CallDefaultMapScript(map_event): Call map script set by SetDefaultMapScript().
  • SetDefaultMapScript(map_event, script): Set map engine to run script when map_event occurs for any map.
    • Map event constants:
      SCRIPT_ON_ENTER_MAP
      SCRIPT_ON_LEAVE_MAP
      SCRIPT_ON_LEAVE_MAP_NORTH
      SCRIPT_ON_LEAVE_MAP_EAST
      SCRIPT_ON_LEAVE_MAP_SOUTH
      SCRIPT_ON_LEAVE_MAP_WEST

Map Elements

API:Functions/Map/Zones

API:Functions/Map/Triggers

API:Functions/Map/Layers

API:Functions/Map/Tiles

Input

API:Functions/Map/Input

Camera

API:Functions/Map/Camera

Persons

API:Functions/Map/Entities