BIS fnc ambientFlyby: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "{{Feature | Informative | " to "{{Feature|informative|")
 
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


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


| arma3 |= Game name
|gr1= Ambient


|1.00|= Game version
|descr= Spawns an air unit that moves from point A to point B, never engaging nor being engaged. It is set as captive and will despawn once it reaches its destination.
____________________________________________________________________________________________
{{Feature|informative|Created vehicle is [[setCaptive|set captive]], making its side [[civilian]].}}


| <pre>/*
|s1= [startPos, endPos, altitude, speedMode, classname, side] call [[BIS_fnc_ambientFlyby]]


Description:
|p1= startPos: [[Position]] - start position of the air unit. The Z value does not matter and is replaced by ''altitude''
Spawns an ambient air unit, makes it move and deletes it when it reaches destination
Vehicle will never engage and will be flagged as captive
Good for simple creation of ambient fly by's


Parameter(s):
|p2= endPos: [[Array]] format [[Position#PositionAGL|PositionAGL]] - end position where the air unit moves to and despawns (through [[addWaypoint]])
_this select 0: ARRAY - The position where vehicle will spawn
_this select 1: ARRAY - The end position of the vehicle, it will be deleted here
_this select 2: NUMBER - The spawn and flight height of the vehicle
_this select 3: STRING - The speed the vehicle will move ("LIMITED", "NORMAL", "FULL")
_this select 4: STRING - The classname of the vehicle to spawn
_this select 5: SIDE - The side the vehicle belongs
Returns:
BOOL - true on success
*/


//Params
|p3= altitude: [[Number]] - (Optional, default 100) height at which air unit will spawn and fly above ground level
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_ambientFlyby]]; --> |= Syntax
|p4= speedMode: [[String]] - (Optional, default "NORMAL") [[speedMode|speed mode]] at which air unit travels. Possible values are "LIMITED", "NORMAL" and "FULL"


|p1= |= Parameter 1
|p5= classname: [[String]] - (Optional, default "B_Heli_Light_01_F") vehicle classname defined in [[CfgVehicles]]


| |= Return value
|p6= side: [[Side]] - (Optional, default [[west]]) side to which the vehicle belongs
____________________________________________________________________________________________


|x1= <code></code> |=
|r1= [[Boolean]] - [[true]] if function executed successfully.
____________________________________________________________________________________________


| |= See also
|x1= <sqf>
// spawns a Littlebird that flies from position 200,200,50 to 250,250,75 at altitude 100 and normal speed
[[200,200,50], [250,250,75]] call BIS_fnc_ambientFlyby;
</sqf>


|x2= <sqf>[getPosATL player, getPosATL opforUnit, 400, "FULL", "B_Heli_Light_01_Armed_F", west] call BIS_fnc_ambientFlyby;</sqf>
|seealso= [[createVehicle]] [[BIS_fnc_spawnVehicle]]
}}
}}
<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: Ambient|{{uc:ambientFlyby}}]]
[[Category:Functions|{{uc:ambientFlyby}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ambientFlyby}}]]

Latest revision as of 22:42, 16 May 2024

Hover & click on the images for description

Description

Description:
Spawns an air unit that moves from point A to point B, never engaging nor being engaged. It is set as captive and will despawn once it reaches its destination.
Created vehicle is set captive, making its side civilian.
Execution:
call
Groups:
Ambient

Syntax

Syntax:
[startPos, endPos, altitude, speedMode, classname, side] call BIS_fnc_ambientFlyby
Parameters:
startPos: Position - start position of the air unit. The Z value does not matter and is replaced by altitude
endPos: Array format PositionAGL - end position where the air unit moves to and despawns (through addWaypoint)
altitude: Number - (Optional, default 100) height at which air unit will spawn and fly above ground level
speedMode: String - (Optional, default "NORMAL") speed mode at which air unit travels. Possible values are "LIMITED", "NORMAL" and "FULL"
classname: String - (Optional, default "B_Heli_Light_01_F") vehicle classname defined in CfgVehicles
side: Side - (Optional, default west) side to which the vehicle belongs
Return Value:
Boolean - true if function executed successfully.

Examples

Example 1:
// spawns a Littlebird that flies from position 200,200,50 to 250,250,75 at altitude 100 and normal speed [[200,200,50], [250,250,75]] call BIS_fnc_ambientFlyby;
Example 2:
[getPosATL player, getPosATL opforUnit, 400, "FULL", "B_Heli_Light_01_Armed_F", west] call BIS_fnc_ambientFlyby;

Additional Information

See also:
createVehicle BIS_fnc_spawnVehicle

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