UAVControl: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Remote Control
____________________________________________________________________________________________


| Returns array with current operator of UAV and his vehicle role in UAV. If nobody is controlling the UAV, the command tries to find any person with connected terminal to this UAV, in which case the vehicle role is an empty string. If command cannot find anyone, output is <tt><nowiki>[</nowiki>[[objNull]], ""]</tt>.
|descr= Returns array with current operator of UAV and his vehicle role in UAV.
<br><br>
If nobody is controlling the UAV, the command tries to find any person with connected terminal to this UAV.
Since Arma 3 v1.95.146028 this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs:
If nobody is connected, [[objNull]] is used as returned operator (see {{Link|#Example 2}}).
* <tt>[player1, "DRIVER"]</tt> - player1 is controlling the UAV and is the pilot
{{Feature|informative|This command works only for vehicles, to get a unit remote-controlling a unit, see [[remoteControlled]] and {{Link|remoteControl#Example 4}}.}}
* <tt>[player2, "GUNNER"]</tt> - player2 is controlling the UAV and is the gunner
* <tt>[player1, "DRIVER", player2, "GUNNER"]</tt> - player1 is controlling the UAV and is the pilot, player2 is controlling UAV and is the gunner
* <tt>[player3, ""]</tt> - no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet
* <tt><nowiki>[</nowiki>[[objNull]], ""]</tt> - nobody is controlling or connected to the UAV
<br>
{{Informative | This command works only for vehicles, to get a unit remote controlling a unit, see Example 3 on the [[remoteControl]] page.}} |DESCRIPTION=
____________________________________________________________________________________________


| [[UAVControl]] uav |SYNTAX=
|s1= [[UAVControl]] uav


|p1= uav: [[Object]] |PARAMETER1=
|p1= uav: [[Object]]


| [[Array]] - in format [unit, vehicleRole] (or sometimes [unit1, vehicleRole, unit2, vehicleRole], see description), where:
|r1= [[Array]] in format [unit, vehicleRole] {{GVI|arma3|1.96|size= 0.75}} or [unit1, vehicleRole1, unit2, vehicleRole2] (see {{Link|#Example 2}}), where:
* unit: [[Object]] - UAV operator
* unit: [[Object]] - UAV operator
* vehicleRole: [[String]] - vehicle role of the operator in UAV. Could be "DRIVER", "GUNNER" or "" (see description) |RETURNVALUE=
* vehicleRole: [[String]] - vehicle role of the operator in UAV. Can be "DRIVER", "GUNNER" or "" (not in control)
____________________________________________________________________________________________


|x1= <code>[[UAVControl]] uav;</code>|EXAMPLE1=
|x1= <sqf>private _result = UAVControl _myUAV;</sqf>
____________________________________________________________________________________________


| [[showUAVFeed]], [[shownUAVFeed]], [[allUnitsUAV]], [[getConnectedUAV]], [[connectTerminalToUAV]], [[isUAVConnected]], [[remoteControl]], [[currentPilot]] |SEEALSO=
|x2= Since {{GVI|arma3|1.96|size= 0.75}} this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs:
<sqf>
[player1, "DRIVER"] // player1 is controlling the UAV and is the pilot
[player2, "GUNNER"] // player2 is controlling the UAV and is the gunner
[player1, "DRIVER", player2, "GUNNER"] // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner
[player3, ""] // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet
[objNull, ""] // nobody is controlling or connected to the UAV
</sqf>


| |MPBEHAVIOUR=  
|seealso= [[showUAVFeed]] [[shownUAVFeed]] [[allUnitsUAV]] [[getConnectedUAV]] [[connectTerminalToUAV]] [[isUAVConnected]] [[remoteControl]] [[currentPilot]] [[isRemoteControlling]] [[remoteControlled]]
}}
}}
<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:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Remote Control]]

Latest revision as of 15:10, 14 November 2023

Hover & click on the images for description

Description

Description:
Returns array with current operator of UAV and his vehicle role in UAV. If nobody is controlling the UAV, the command tries to find any person with connected terminal to this UAV. If nobody is connected, objNull is used as returned operator (see Example 2).
This command works only for vehicles, to get a unit remote-controlling a unit, see remoteControlled and remoteControl - Example 4.
Groups:
Remote Control

Syntax

Syntax:
UAVControl uav
Parameters:
uav: Object
Return Value:
Array in format [unit, vehicleRole] Arma 3 logo black.png1.96 or [unit1, vehicleRole1, unit2, vehicleRole2] (see Example 2), where:
  • unit: Object - UAV operator
  • vehicleRole: String - vehicle role of the operator in UAV. Can be "DRIVER", "GUNNER" or "" (not in control)

Examples

Example 1:
private _result = UAVControl _myUAV;
Example 2:
Since Arma 3 logo black.png1.96 this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs:
[player1, "DRIVER"] // player1 is controlling the UAV and is the pilot [player2, "GUNNER"] // player2 is controlling the UAV and is the gunner [player1, "DRIVER", player2, "GUNNER"] // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner [player3, ""] // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet [objNull, ""] // nobody is controlling or connected to the UAV

Additional Information

See also:
showUAVFeed shownUAVFeed allUnitsUAV getConnectedUAV connectTerminalToUAV isUAVConnected remoteControl currentPilot isRemoteControlling remoteControlled

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