BIS fnc HUDLimits: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| tkoh |Game name=
| tkoh


|1.00|Game version=
|1.00


|gr1= GUI |GROUP1=
|gr1= GUI


| Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also [[setHUDMovementLevels]].<br>
| Set helicopter advanced flight model HUD limits and prevents overwriting existing values. See also [[setHUDMovementLevels]].<br>
Line 13: Line 13:
* using 0 in min or max value will hide the corresponding limit
* using 0 in min or max value will hide the corresponding limit
* same or higher priority will replace currently set priority
* 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 |DESCRIPTION=
* using a negative priority will reset the values if absolute value is same or higher than current level


| [speedLimit, altLimit, dirLimit] call [[BIS_fnc_HUDLimits]] |SYNTAX=
| [speedLimit, altLimit, dirLimit] call [[BIS_fnc_HUDLimits]]


|p1= speedLimit: [[Array]] in format [priority, min, max]:
|p1= speedLimit: [[Array]] in format [priority, min, max]:
* priority: [[Number]]
* priority: [[Number]]
* min: [[Number]]
* min: [[Number]]
* max: [[Number]] |PARAMETER1=
* max: [[Number]]


|p2= altLimit: [[Array]] in format [priority, min, max]:
|p2= altLimit: [[Array]] in format [priority, min, max]:
* priority: [[Number]]
* priority: [[Number]]
* min: [[Number]]
* min: [[Number]]
* max: [[Number]] |PARAMETER2=
* max: [[Number]]


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


| [[Array]] - current value of [[HUDMovementLevels]] |RETURNVALUE=
| [[Array]] - current value of [[HUDMovementLevels]]


|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> |EXAMPLE1=
|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>


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


| [[HUDMovementLevels]], [[setHUDMovementLevels]] |SEEALSO=
| [[HUDMovementLevels]], [[setHUDMovementLevels]]


}}
}}

Revision as of 23:19, 17 January 2021

Hover & click on the images for description

Description

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

Notes:
  • 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:
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


Bottom Section