Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:MapSetPinFilter

From RoR Wiki

UI Lua API · Map functions
Version: WAR 1.4.8

Shows or hides one type of map pin in a map window.

MapSetPinFilter(mapDisplayName, pinType, show)

Arguments

mapDisplayName
string – Name of a MapDisplay window set up with CreateMapInstance.
pinType
number – Pin type, a SystemData.MapPips value. Must be 0–57.
show
boolean – true to show pins of this type, false to hide them.

Returns

Nothing.

Details

  • The setting is kept per map window, so the overhead map and the world map have separate filters.
  • Pin types outside 0–57 and unknown window names are ignored without an error.
  • When the setting changes, the client updates the pins of that window.
  • show must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • The function needs at least three arguments and only reads the last three.

Errors

None besides the generic Invalid Parameters message when an argument has the wrong type.

Example

From default/ea_siegeweaponwindow/source/siegeweaponscorchfirewindow.lua, showing only the siege pins on the aiming map:

MapSetPinFilter("SiegeWeaponScorchFireWindowAimWindowMapDisplay", filterType, false )
...
MapSetPinFilter("SiegeWeaponScorchFireWindowAimWindowMapDisplay", SystemData.MapPips.PLAYER_SIEGE_WEAPON, true )
MapSetPinFilter("SiegeWeaponScorchFireWindowAimWindowMapDisplay", SystemData.MapPips.PLAYER_SIEGE_AIM_LOCATION, true )

See also