Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:MapSetMapView

From RoR Wiki

UI Lua API · Interface functions
Version: WAR 1.4.8

Chooses which map a map window shows.

MapSetMapView(windowName, mapLevel, mapId)

Arguments

windowName
string – Name of a MapDisplay window that has been set up with CreateMapInstance.
mapLevel
number – Level of the map, a value from GameDefs.MapLevel (WORLD_MAP, PAIRING_MAP, ZONE_MAP, ...).
mapId
number – Id of the map at that level, for example a zone id for ZONE_MAP.

Returns

Nothing.

Details

  • If the window was never passed to CreateMapInstance, nothing happens.
  • If there is no map for this level and id, the client falls back to its default view (the entry stored under level -1, id 0) when that exists.
  • If the client's map data is not loaded, the call does nothing.
  • No errors are reported for unknown windows or maps.

Errors

None besides the Invalid Parameters argument check.

Example

From ea_overheadmapwindow/source/overheadmapwindow.lua:

MapSetMapView( "EA_Window_OverheadMapMapDisplay", GameDefs.MapLevel.ZONE_MAP, GameData.Player.zone  )

From ea_worldmapwindow/source/zoneview.lua:

MapSetMapView( "EA_Window_WorldMapZoneViewMapDisplay", EA_Window_WorldMap.currentLevel, EA_Window_WorldMap.currentMap )

See also