BIS fnc HUDLimits: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also [[setHUDMovementLevels]].<br />
<br />
Note about priority:
* default value is 0, which means no limits were assigned
* using 0 will hide the limits, no matter the priorities
* 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 |= Description
____________________________________________________________________________________________


Description:
| [speedLimit, altLimit, dirLimit] call [[BIS_fnc_HUDLimits]] |= Syntax
Set HUD limits and prevents overwriting existing values


Parameter(s):
|p1= speedLimit: [[Array]] in format [priority, min, max]:
_this select 0: ARRAY - speed limit [priority,min,max,]
* priority: [[Number]]
_this select 1: ARRAY - altitude limit [priority,min,max]
* min: [[Number]]
_this select 2: ARRAY - direction limit [priority,min,max,target]
* max: [[Number]] |= Parameter 1


Returns:
|p2= altLimit: [[Array]] in format [priority, min, max]:
ARRAY - current value of HUDMovementLevels
* priority: [[Number]]
* min: [[Number]]
* max: [[Number]] |= Parameter 1


Note:
|p3= dirLimit: [[Array]] in format [priority, min, max, target]:
* 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
* target: [[Position]] or [[Object]] - if set, the direction will be relative to it |= Parameter 1
* 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
| [[Array]] - current value of [[HUDMovementLevels]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_HUDLimits]]; --> |= Syntax
|x1= <code><nowiki>[</nowiki>[0,0,0], [1, 0, 50], [0,0,0]] [[call]] [[BIS_fnc_HUDLimits]]; {{codecomment|// limits altitude on HUD to 50m max}}</code> |= Example 1
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________


|x1= <code></code> |=  
|x2= <code><nowiki>[</nowiki>[0,0,0], [0, 0, 0], [1,0,30, myTarget]] [[call]] [[BIS_fnc_HUDLimits]]; {{codecomment|// limits orientation towards myTarget by ±30°}}</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[HUDMovementLevels]], [[setHUDMovementLevels]] |= See also


}}
}}

Revision as of 10:49, 22 April 2018


Hover & click on the images for description

Description

Description:
Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also setHUDMovementLevels.

Note about priority:
  • default value is 0, which means no limits were assigned
  • using 0 will hide the limits, no matter the priorities
  • 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
Execution:
call
Groups:
Uncategorised

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]:
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,0,30, myTarget]] call BIS_fnc_HUDLimits; // limits orientation towards myTarget by ±30°

Additional Information

See also:
HUDMovementLevelssetHUDMovementLevels

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

Bottom Section