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, aSystemData.MapPipsvalue. Must be 0–57.- show
boolean–trueto show pins of this type,falseto 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.
showmust be a real boolean. Passingnilor 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 )
