UAVControl: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
mNo edit summary
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| arma3 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns array with current operator of UAV and his vehicle role in UAV.<br><br> {{Informative | This command works only for vehicles, to get a unit remote controlling a unit, see Example 3 on the [[remoteControl]] page}} |= 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, in which case the vehicle role is an empty string. If command cannot find anyone, output is <tt><nowiki>[</nowiki>[[objNull]], ""]</tt>.
<br><br>
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:
* <tt>[player1, "DRIVER"]</tt> - player1 is controlling the UAV and is the pilot
* <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
| [[UAVControl]] uav |SYNTAX=


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


| [[Array]] - in format [unit, vehicleRole], where:
| [[Array]] - in format [unit, vehicleRole] (or sometimes [unit1, vehicleRole, unit2, vehicleRole], see description), where:
* unit: [[Object]] - UAV operator
* unit: [[Object]] - UAV operator
* vehicleRole: [[String]] - vehicle role of the operator in UAV, for example: "DRIVER" or "GUNNER" |RETURNVALUE=
* vehicleRole: [[String]] - vehicle role of the operator in UAV. Could be "DRIVER", "GUNNER" or "" (see description) |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 22: Line 31:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[showUAVFeed]], [[shownUAVFeed]], [[allUnitsUAV]], [[getConnectedUAV]], [[connectTerminalToUAV]], [[isUAVConnected]], [[remoteControl]] |SEEALSO=  
| [[showUAVFeed]], [[shownUAVFeed]], [[allUnitsUAV]], [[getConnectedUAV]], [[connectTerminalToUAV]], [[isUAVConnected]], [[remoteControl]], [[currentPilot]] |SEEALSO=  


| |MPBEHAVIOUR=  
| |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}


Line 39: Line 47:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Remote Control]]

Revision as of 18:04, 26 August 2019

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, in which case the vehicle role is an empty string. If command cannot find anyone, output is [objNull, ""].

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:
  • [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 and is the pilot, player2 is controlling UAV and is 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

This command works only for vehicles, to get a unit remote controlling a unit, see Example 3 on the remoteControl page.
Groups:
Uncategorised

Syntax

Syntax:
UAVControl uav
Parameters:
uav: Object
Return Value:
Array - in format [unit, vehicleRole] (or sometimes [unit1, vehicleRole, unit2, vehicleRole], see description), where:
  • unit: Object - UAV operator
  • vehicleRole: String - vehicle role of the operator in UAV. Could be "DRIVER", "GUNNER" or "" (see description)

Examples

Example 1:
UAVControl uav;

Additional Information

See also:
showUAVFeedshownUAVFeedallUnitsUAVgetConnectedUAVconnectTerminalToUAVisUAVConnectedremoteControlcurrentPilot

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

Notes

Bottom Section