Arma 3 Scripting

Command in Remote Control

UAVControl

Also available as Markdown and JSON, or read the original wiki 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 if player has terminal connected to this UAV. If nobody is connected, objNull is used as returned operator (see #Example 2). The possible outputs are:

The UAV terminals are local to the players so only local terminal connections are returned.

Note

This command works only for vehicles, to get a unit remote-controlling a unit, see remoteControlled and remoteControl#Example 4.

While main syntax can only return remote players when they are controlling either pilot or gunner, the alternative syntax can also return all remote players connected with terminals to given UAV.

Syntax

Syntax 1

UAVControl uav

Parameters:

Returns: - Array with [unit, vehicleRole]

Syntax 2

since arma3 2.22

UAVControl [uav, option]

Parameters:

Returns: Array - [player1], [player1, player2] or [player1, player2,...playerN]

Examples

Example 1

private _result = UAVControl _myUAV;

Example 2

Since Arma 3 v1.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 but there maybe an abandoned terminal connected to the UAV, 
               // which will auto-disconnect when a new connection to the UAV is made

See also

showUAVFeed · shownUAVFeed · allUnitsUAV · getConnectedUAV · connectTerminalToUAV · isUAVConnected · remoteControl · currentPilot · isRemoteControlling · remoteControlled