BIS fnc wpFormation: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= |p5=" to "|PARAMETER4= |p5=")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| TKOH |Game name=
|game1= tkoh
|version1= 1.00


|1.00|Game version=
|gr1= Waypoints
____________________________________________________________________________________________


| FORMATION [[Custom_Waypoints|custom waypoint]].
|descr= 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] |SYNTAX=
|exec=spawn


|p1= failCode: [[Number]] - Code executed if unit spends too long outside formation |Parameter1=
|s1= [[Custom Waypoints#Function|Custom Waypoint arguments]]: [failCode, maxTime, relPos, diffAlt, visualize]
|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 only when waypoint condition was met (always [[false]] in Function execution), and failCode is executed once maxTime is reached.|Parameter2=


|p3= relPos: [[Array]] - in format [relDist, relAngle]
|p1= failCode: [[Number]] - code executed if unit spends too long outside formation
<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) |PARAMETER4=


|p5= visualize: [[Boolean]] - true to show hint (default: false) |=
|p2= maxTime: [[Number]] - time required to be spent in formation (default: 0)
* when &gt; 0, waypoint is completed once maxTime was reached
* when &lt;= 0, waypoint is completed only when waypoint condition was met (always [[false]] in Function execution), and ''failCode'' is executed once ''maxTime'' is reached


| [[Nothing]] |RETURNVALUE=
|p3= 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)
|x1= <code><nowiki>[</nowiki>[[player]], dude, 80, {HSim_keptFormation = [[false]]}, -60, [80,160], 20, [[true]]] BIS_fnc_wpFormation;</code> |=


____________________________________________________________________________________________
|p4= diffAlt: [[Number]] - altitude tolerance in meters (default: -1)
| exec=spawn |=


| |SEEALSO=
|p5= visualize: [[Boolean]] - true to show hint (default: false)


}}
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>[player, dude, 80, { HSim_keptFormation = false }, -60, [80,160], 20, true] spawn BIS_fnc_wpFormation;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso=
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Take_On_Helicopters:_Functions|wpFormation]]
[[Category:Function Group: Waypoints|wpFormation]]

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
FORMATION custom waypoint. Player must stay within certain radius and angle towards followed vehicle.
Execution:
spawn
Groups:
Waypoints

Syntax

Syntax:
Custom Waypoint arguments: [failCode, maxTime, relPos, diffAlt, visualize]
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:
Nothing

Examples

Example 1:
[player, dude, 80, { HSim_keptFormation = false }, -60, [80,160], 20, true] spawn 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