BIS fnc HUDLimits: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Some wiki formatting)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


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


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= GUI
____________________________________________________________________________________________


| <pre>/*
|descr= Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also [[setHUDMovementLevels]].
 
{{Feature|informative|
Description:
* default value is 0, which means no limits were assigned
Set HUD limits and prevents overwriting existing values
* using 0 in min or max value will hide the corresponding limit
 
* same or higher priority will replace currently set priority
Parameter(s):
* using a negative priority will reset the values if absolute value is same or higher than current level
_this select 0: ARRAY - speed limit [priority,min,max,]
}}
_this select 1: ARRAY - altitude limit [priority,min,max]
_this select 2: ARRAY - direction limit [priority,min,max,target]


Returns:
|s1= [speedLimit, altLimit, dirLimit] call [[BIS_fnc_HUDLimits]]
ARRAY - current value of HUDMovementLevels


Note:
|p1= speedLimit: [[Array]] in format [priority, min, max]:
* priority
* priority: [[Number]]
* default value is 0, which means no limits were assigned
* min: [[Number]]
* using 0 as priority will hide the limits, no matter the priorities
* max: [[Number]]
* same or higher priority will replace currently set priority
* using negative value will reset the values, if absolute value is same or higher than current level
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= altLimit: [[Array]] in format [priority, min, max]:
____________________________________________________________________________________________
* priority: [[Number]]
* min: [[Number]]
* max: [[Number]]


| <!-- [] call [[BIS_fnc_HUDLimits]]; --> |= Syntax
|p3= dirLimit: [[Array]] in format [priority, min, max, target]:
* priority: [[Number]]
* min: [[Number]] - you can set a "negative" value by adding 360 (e.g using 270 instead of -90)
* max: [[Number]]
* target: [[Position]] or [[Object]] - (Optional, default [0,0,0]) the direction relative target


|p1= |= Parameter 1
|r1= [[Array]] - current value of [[HUDMovementLevels]]


| |= Return value
|x1= <sqf>[[0,0,0], [1, 0, 50], [0,0,0]] call BIS_fnc_HUDLimits; // limits altitude on HUD to 50m max</sqf>
____________________________________________________________________________________________


|x1= <code></code> |=
|x2= <sqf>[[0,0,0], [0, 0, 0], [1,330,30, myTarget]] call BIS_fnc_HUDLimits; // limits orientation towards myTarget by ±30°</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[HUDMovementLevels]] [[setHUDMovementLevels]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: GUI|{{uc:HUDLimits}}]]
[[Category:Functions|{{uc:HUDLimits}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:HUDLimits}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:HUDLimits}}]]

Latest revision as of 15:25, 13 July 2022

Hover & click on the images for description

Description

Description:
Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also setHUDMovementLevels.
  • default value is 0, which means no limits were assigned
  • using 0 in min or max value will hide the corresponding limit
  • same or higher priority will replace currently set priority
  • using a negative priority will reset the values if absolute value is same or higher than current level
Execution:
call
Groups:
GUI

Syntax

Syntax:
[speedLimit, altLimit, dirLimit] call BIS_fnc_HUDLimits
Parameters:
speedLimit: Array in format [priority, min, max]:
altLimit: Array in format [priority, min, max]:
dirLimit: Array in format [priority, min, max, target]:
  • priority: Number
  • min: Number - you can set a "negative" value by adding 360 (e.g using 270 instead of -90)
  • max: Number
  • target: Position or Object - (Optional, default [0,0,0]) the direction relative target
Return Value:
Array - current value of HUDMovementLevels

Examples

Example 1:
[[0,0,0], [1, 0, 50], [0,0,0]] call BIS_fnc_HUDLimits; // limits altitude on HUD to 50m max
Example 2:
[[0,0,0], [0, 0, 0], [1,330,30, myTarget]] call BIS_fnc_HUDLimits; // limits orientation towards myTarget by ±30°

Additional Information

See also:
HUDMovementLevels setHUDMovementLevels

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