BIS fnc moduleCoverMap: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (triggerArea note and example tweak)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|Comments=
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Modules


|1.00|= Game version
|gr2= Map and Markers


|eff= global |Effects in MP=
|eff= global
____________________________________________________________________________________________


|Covers the map except a defined area to highlight the area of operation. Works on dedicated server. This function was designed to be used by the [[Modules|Modules framework]], but it can also be used with module. The effect does not move with the centerObject.<br><br>It's essential for the function to work that '''centerObject''' has the variable '''objectArea''' defined.<br>
|descr= [[File:BIS_fnc_moduleCoverMap.jpg|right|500px]]
<code>centerObject [[setVariable]] ["objectArea",[sizeX,sizeY,rotation]]</code>
Covers the map except for a defined area. This function was designed to be used by the [[Modules|Modules framework]], but it can also be used without the module. The effect does not move with the centerObject.
*centerObject [[Object]] - Object which is used as center
*sizeX: [[Number]] -  Length in x in meters
*sizeY: [[Number]] - Length in y in meters
*roation: [[Number]] - Rotation of the rectangle in degree
[[File:BIS fnc moduleCoverMap.jpg|500px]]|DESCRIPTION=
____________________________________________________________________________________________


| [centerUnit,units,init] call [[BIS_fnc_moduleCoverMap]]|SYNTAX=
{{Feature|important|
 
It is essential for the function to work that '''centerObject''' has the '''objectArea''' variable defined.
|p1= centerUnit: [[Object]] - Object which is used as center|Parameter 1=
<sqf>centerObject setVariable ["objectArea", [sizeX, sizeY, rotation]]</sqf>
|p2= units: [[Array]] - '''Not used inside the function'''|Parameter 2=
* centerObject: [[Object]] - object which is used as center
|p3= init: [[Boolean]] - [[True]] to create cover map effect, [[false]] to remove all markers and destroy the effect|Parameter 3=
* sizeX: [[Number]] - length in x in meters
* sizeY: [[Number]] - length in y in meters
* rotation: [[Number]] - shape's rotation in degree
}}


|[[Nothing]]|RETURNVALUE=
|s1= [centerUnit, units, init] call [[BIS_fnc_moduleCoverMap]]
____________________________________________________________________________________________


|x1= <code>centerObject [[setVariable]] ["objectArea",[1000,1000,0,[[false]],0]]; 
|p1= centerUnit: [[Object]] - object which is used as center
[_centerObject,[],[[true]]<noWiki>]</noWiki> [[call]] [[BIS_fnc_moduleCoverMap]];</code>
//Covers the whole map except an area of 1000 m by 1000 m, can be used to dynamically change size of the area during mission|=
____________________________________________________________________________________________


|[[showMap]]|SEEALSO=
|p2= units: [[Array]] - '''Not used inside the function'''


}}
|p3= init: [[Boolean]] - [[true]] to create cover map effect, [[false]] to remove all markers and destroy the effect


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>
</dl>
// 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;
</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[showMap]]
[[Category:Function Group: Misc|{{uc:moduleCoverMap}}]]
}}
[[Category:Functions|{{uc:moduleCoverMap}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:moduleCoverMap}}]]

Latest revision as of 09:51, 20 January 2024

Hover & click on the images for description

Description

Description:
BIS fnc moduleCoverMap.jpg

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.

It is essential for the function to work that centerObject has the objectArea variable defined.

centerObject setVariable ["objectArea", [sizeX, sizeY, rotation]]

  • centerObject: Object - object which is used as center
  • sizeX: Number - length in x in meters
  • sizeY: Number - length in y in meters
  • rotation: Number - shape's rotation in degree
Execution:
call
Groups:
ModulesMap and Markers

Syntax

Syntax:
[centerUnit, units, init] call BIS_fnc_moduleCoverMap
Parameters:
centerUnit: Object - object which is used as center
units: Array - Not used inside the function
init: Boolean - true to create cover map effect, false to remove all markers and destroy the effect
Return Value:
Nothing

Examples

Example 1:
// 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;

Additional Information

See also:
showMap

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note