worldSize: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3>" to "")
(see also getTerrainInfo)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 1.48
|1.48


|gr1= Mission Information
|gr1= Mission Information


| 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]]).
|descr= 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]]).
 
| [[worldSize]]


| [[Number]]
|s1= [[worldSize]]
 
|x1= <code>[[private]] _size = [[worldSize]];</code>


| [[worldName]], [[missionName]], [[briefingName]], [[serverName]], [[BIS_fnc_mapSize]]
|r1= [[Number]]
}}


<dl class="command_description">
|x1= <sqf>private _size = worldSize;</sqf>
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on September 1, 2019 - 12:01 (UTC)</dd>
|x2= <sqf>// A round marker that should cover the whole map, placed in the center of the map, should have the following radius (a, b)
<dt class="note">[[User:R3vo|R3vo]]</dt>
private _radius = sqrt 2 / 2 * worldSize;</sqf>
<dd class="note">
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;
[[private]] _center = [_a, _a, 0];
[[private]] _size = [[sqrt]] 2 * _a;</code>
</dd>


<!-- Note Section END -->
|x3= <sqf>private _axis = worldSize / 2;
</dl>
private _center = [_axis, _axis , 0];
private _radius = sqrt 2 * _axis;</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[BIS_fnc_mapSize]] [[getTerrainInfo]]
}}

Latest revision as of 16:07, 30 May 2023

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:
Mission Information

Syntax

Syntax:
worldSize
Return Value:
Number

Examples

Example 1:
private _size = worldSize;
Example 2:
// A round marker that should cover the whole map, placed in the center of the map, should have the following radius (a, b) private _radius = sqrt 2 / 2 * worldSize;
Example 3:
private _axis = worldSize / 2; private _center = [_axis, _axis , 0]; private _radius = sqrt 2 * _axis;

Additional Information

See also:
BIS_fnc_mapSize getTerrainInfo

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