worldSize: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Update description)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns the engine calculated size of the current world (do not confuse with [[BIS_fnc_mapSize]], which could return the same value, but is just a simple look up in [[configFile | config]]). |DESCRIPTION=
| Returns the engine calculated size (terrain side length) of the current world ([[BIS_fnc_mapSize]] may return the same value, but is just a simple look up in [[configFile | config]]). |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 15: Line 15:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_size = [[worldSize]];</code> |EXAMPLE1=
|x1= <code>[[private]] _size = [[worldSize]];</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[worldName]], [[missionName]], [[briefingName]], [[serverName]], [[BIS_fnc_mapSize]] |SEEALSO=
| [[worldName]], [[missionName]], [[briefingName]], [[serverName]], [[BIS_fnc_mapSize]] |SEEALSO=
}}
}}


Line 26: Line 25:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Mission_Information|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on September 1, 2019 - 12:01 (UTC)</dd>
<dd class="notedate">Posted on September 1, 2019 - 12:01 (UTC)</dd>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dt class="note">[[User:R3vo|R3vo]]</dt>
<dd class="note">
<dd class="note">
In order to cover the map by for example a round marker, one can get the dimensions like this:<br>
In order to cover the map by for example a round marker, one can get the dimensions like this:<br>
<code>[[private]] _a = [[worldSize]] / 2;</code>
<code>[[private]] _a = [[worldSize]] / 2;
<code>[[private]] _center = [_a, _a, 0];</code>
[[private]] _center = [_a, _a, 0];
<code>[[private]] _size = [[sqrt]] 2 * _a;</code>
[[private]] _size = [[sqrt]] 2 * _a;</code>
</dd>
</dd>
<!-- Note Section END -->
</dl>
</dl>
<!-- DISCONTINUE Notes -->
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Command Group: Mission Information|{{uc:{{PAGENAME}}}}]]

Revision as of 09:32, 13 July 2020

Hover & click on the images for description

Description

Description:
Returns the engine calculated size (terrain side length) of the current world (BIS_fnc_mapSize may return the same value, but is just a simple look up in config).
Groups:
Uncategorised

Syntax

Syntax:
worldSize
Return Value:
Number

Examples

Example 1:
private _size = worldSize;

Additional Information

See also:
worldNamemissionNamebriefingNameserverNameBIS_fnc_mapSize

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

Notes

Posted on September 1, 2019 - 12:01 (UTC)
R3vo
In order to cover the map by for example a round marker, one can get the dimensions like this:
private _a = worldSize / 2; private _center = [_a, _a, 0]; private _size = sqrt 2 * _a;

Bottom Section