{"name":"BIS_fnc_moduleCoverMap","title":"BIS fnc moduleCoverMap","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_moduleCoverMap","revid":351893,"updated":"2024-01-20T08:51:29Z","groups":["Modules","Map and Markers"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","locality":{"effect":"global"},"description":"Covers the map except for a defined area. This function was designed to be used by the Modules framework, but it can also be used without the module. The effect does not move with the centerObject.\n\n> [!IMPORTANT]\n> It is essential for the function to work that **centerObject** has the **objectArea** variable defined.\n>\n> ```sqf\n> centerObject setVariable [\"objectArea\", [sizeX, sizeY, rotation]]\n> ```\n>\n> - centerObject: Object - object which is used as center\n> - sizeX: Number - length in x in meters\n> - sizeY: Number - length in y in meters\n> - rotation: Number - shape's rotation in degree","syntaxes":[{"syntax":"[centerUnit, units, init] call BIS_fnc_moduleCoverMap","params":[{"name":"centerUnit","type":"Object","description":"object which is used as center","type_expr":"Object"},{"name":"units","type":"Array","description":"**Not used inside the function**","type_expr":"Array"},{"name":"init","type":"Boolean","description":"true to create cover map effect, false to remove all markers and destroy the effect","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"}}],"examples":[{"text":"```sqf\n// covers the whole map except an area of 1000m by 1000m\n// can be used to dynamically change size of the area during mission\ncenterObject setVariable [\"objectArea\",[1000, 1000, 0]];    // same format with triggerArea, except the function only needs first three\n[centerObject, [], true] call BIS_fnc_moduleCoverMap;\n```","code":["// covers the whole map except an area of 1000m by 1000m\n// can be used to dynamically change size of the area during mission\ncenterObject setVariable [\"objectArea\",[1000, 1000, 0]];\t// same format with triggerArea, except the function only needs first three\n[centerObject, [], true] call BIS_fnc_moduleCoverMap;"]}],"see_also":["showMap"]}