---
name: "BIS_fnc_moduleCoverMap"
type: function
status: ok
groups: ["Modules", "Map and Markers"]
arma3_since: "1.00"
locality: {"argument": null, "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_moduleCoverMap
revid: 351893
updated: 2024-01-20T08:51:29Z
---

# BIS_fnc_moduleCoverMap

*Function · Modules, Map and Markers · Arma 3 v1.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.

> [!IMPORTANT]
> It is essential for the function to work that **centerObject** has the **objectArea** variable defined.
>
> ```sqf
> centerObject setVariable ["objectArea", [sizeX, sizeY, rotation]]
> ```
>
> - centerObject: [Object](../topics/Object.md) - object which is used as center
> - sizeX: [Number](../topics/Number.md) - length in x in meters
> - sizeY: [Number](../topics/Number.md) - length in y in meters
> - rotation: [Number](../topics/Number.md) - shape's rotation in degree

## Syntax

```sqf
[centerUnit, units, init] call BIS_fnc_moduleCoverMap
```

**Parameters:**

- `centerUnit`: [Object](../topics/Object.md) - object which is used as center
- `units`: [Array](../topics/Array.md) - **Not used inside the function**
- `init`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to create cover map effect, [false](../commands/false.md) to remove all markers and destroy the effect

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
// covers the whole map except an area of 1000m by 1000m
// can be used to dynamically change size of the area during mission
centerObject setVariable ["objectArea",[1000, 1000, 0]];    // same format with [[triggerArea]], except the function only needs first three
[centerObject, [], true] call BIS_fnc_moduleCoverMap;
```

## See also

[showMap](../commands/showMap.md)

<sub>Source: [BI Community Wiki — BIS fnc moduleCoverMap](https://community.bistudio.com/wiki/BIS_fnc_moduleCoverMap) (revision 351893).</sub>
