BIS fnc wpFormation: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "{{Function" to "{{RV|type=function ")
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function
____________________________________________________________________________________________
| TKOH|1.00|gr1= Waypoints| FORMATION [[Custom_Waypoints|custom waypoint]].
 
| TKOH |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
| FORMATION [[Custom_Waypoints|custom waypoint]].


Player must stay within certain radius and angle towards followed vehicle.
Player must stay within certain radius and angle towards followed vehicle.
|= Description
| [[Custom_Waypoints#Function|arguments]]: [failCode, maxTime, relPos, diffAlt, visualize]|p1= failCode: [[Number]] - Code executed if unit spends too long outside formation
____________________________________________________________________________________________
 
| [[Custom_Waypoints#Function|arguments]]: [failCode, maxTime, relPos, diffAlt, visualize] |= Syntax
 
|p1= failCode: [[Number]] - Code executed if unit spends too long outside formation |=
|p2= maxTime: [[Number]] - Time required to be spent in formation (default: 0)
|p2= maxTime: [[Number]] - Time required to be spent in formation (default: 0)
<br />When > 0, waypoint is completed once maxTime was reached.
<br>When > 0, waypoint is completed once maxTime was reached.
<br />When <= 0, waypoint is completed only when waypoint condition was met (always [[false]] in Function execution), and failCode is executed once maxTime is reached.|=
<br>When <= 0, waypoint is completed only when waypoint condition was met (always [[false]] in Function execution), and failCode is executed once maxTime is reached.|p3= relPos: [[Array]] - in format [relDist, relAngle]
|p3= relPos: [[Array]] - in format [relDist, relAngle]
<br>relDist: [[Number]] - required distance in meters from followed target (default: 100m)
<br />relDist: [[Number]] - required distance in meters from followed target (default: 100m)
<br>relAngle [[Number]] - required relative angle in degrees from followed target (default: 180)|p4= diffAlt: [[Number]] - Altitude tolerance in meters (default: -1)|p5= visualize: [[Boolean]] - true to show hint (default: false)| [[Nothing]]
<br />relAngle [[Number]] - required relative angle in degrees from followed target (default: 180) |=
|p4= diffAlt: [[Number]] - Altitude tolerance in meters (default: -1) |=
|p5= visualize: [[Boolean]] - true to show hint (default: false) |=
 
| [[Nothing]] |= Return value
____________________________________________________________________________________________
   
   
|x1= <code><nowiki>[</nowiki>[[player]], dude, 80, {HSim_keptFormation = [[false]]}, -60, [80,160], 20, [[true]]] BIS_fnc_wpFormation;</code> |=
|x1= <code><nowiki>[</nowiki>[[player]], dude, 80, {HSim_keptFormation = [[false]]}, -60, [80,160], 20, [[true]]] BIS_fnc_wpFormation;</code>| exec=spawn
 
____________________________________________________________________________________________
| exec=spawn |=
 
| |= See also
 
}}
 
<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:Take_On_Helicopters:_Functions|wpFormation]]
[[Category:Take_On_Helicopters:_Functions|wpFormation]]
[[Category:Function Group: Waypoints|wpFormation]]
[[Category:Function Group: Waypoints|wpFormation]]

Revision as of 12:46, 24 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
spawn
Groups:
Waypoints

Syntax

Syntax:
Syntax needed
Parameters:
failCode: Number - Code executed if unit spends too long outside formation
maxTime: Number - Time required to be spent in formation (default: 0)
When > 0, waypoint is completed once maxTime was reached.
When <= 0, waypoint is completed only when waypoint condition was met (always false in Function execution), and failCode is executed once maxTime is reached.
relPos: Array - in format [relDist, relAngle]
relDist: Number - required distance in meters from followed target (default: 100m)
relAngle Number - required relative angle in degrees from followed target (default: 180)
diffAlt: Number - Altitude tolerance in meters (default: -1)
visualize: Boolean - true to show hint (default: false)
Return Value:
Return value needed

Examples

Example 1:
[player, dude, 80, {HSim_keptFormation = false}, -60, [80,160], 20, true] BIS_fnc_wpFormation;

Additional Information

See also:
See also needed

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