Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetOverheadMapZoomLevel

From RoR Wiki

UI Lua API · Map functions
Version: WAR 1.4.8

Sets the zoom level of the overhead map (minimap).

SetOverheadMapZoomLevel(zoomLevel)

Arguments

zoomLevel
number – The new zoom level. Fractions are rounded down; the result must be 0, 1 or 2. The stock UI uses the range SystemData.OverheadMap.MIN_ZOOM_LEVEL to SystemData.OverheadMap.MAX_ZOOM_LEVEL.

Returns

Nothing.

Details

  • Values that are not 0, 1 or 2 after rounding down are ignored without an error.
  • If the overhead map has not been created, the call does nothing.
  • Read the value back with GetOverheadMapZoomLevel.
  • Exactly one argument must be passed.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From default/ea_siegeweaponwindow/source/siegeweaponscorchfirewindow.lua, zooming out while aiming and restoring the old level afterwards:

SiegeWeaponScorchFireWindow.cachedOverheadZoomLevel = GetOverheadMapZoomLevel()
SetOverheadMapZoomLevel( SystemData.OverheadMap.MIN_ZOOM_LEVEL )
...
SetOverheadMapZoomLevel( SiegeWeaponScorchFireWindow.cachedOverheadZoomLevel )

See also