Command Group: Remote Control – Category

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Stub}} " to "")
No edit summary
Line 1: Line 1:
Remote control [[Arma 3 Field Manual - Uav|UAVs]] or units.
Remote control [[Arma 3 Field Manual - Uav|UAVs]] or units.


Remote control allows to transfer player control to a unit. By executing [[remoteControl]] the movement control is transferred. In order to take full control the camera has to be transferred as well with [[switchCamera]] in this case the view and the firing control is transferred too.<br><br>
In some cases [[remoteControl]] is enough and the camera transfer happens automatically. Same goes for termination of the remote control and the camera transfer back to player can happen automatically or might need to be forced. The remote control is handled [[local]]ly, this is why it is important that all arguments for [[remoteControl]], [[remoteControlled]] and [[isRemoteControlling]] commands are [[local]]. Exception is the target unit argument for [[remoteControl]] command, which can be remote, in which case the unit will be moved to [[player]] [[local]]ity. When player is controlling the unit, the unit is [[local]] to player, if not, then something went terribly wrong. <br><br>
Only [[isPlayer]] players can control units. Players cannot control other players. When a player takes control of a unit that is controlled by another player, the unit is transferred to the new owner and previous player control is terminated. This is unfortunate legacy behaviour we cannot safely change.<br><br>
When player controls a unit and the unit dies, the control stays with that unit (another legacy behaviour). After a short time, dead unit leaves its group, in which case [[remoteControlled]] for this unit will return [[objNull]], but [[isRemoteControlling]] for the player controlling the unit will still return [[true]] and the player will remain in remote control mode and appear to be stuck. To exit this mode, the user can execute:
<sqf>player remoteControl objNull;</sqf>
and if nescessary:
<sqf>switchCamera player;</sqf>
Remote control can also be terminated when only unit is known:
<sqf>objNull remoteControl _unit;</sqf>
The [[remoteControlled]] script command works both ways and can return either the controlling player or contrilled unit depending on the argument used (see command description).


[[Category:Scripting Commands by Functionality]]
[[Category:Scripting Commands by Functionality]]

Revision as of 08:58, 1 August 2023

Remote control UAVs or units.

Remote control allows to transfer player control to a unit. By executing remoteControl the movement control is transferred. In order to take full control the camera has to be transferred as well with switchCamera in this case the view and the firing control is transferred too.

In some cases remoteControl is enough and the camera transfer happens automatically. Same goes for termination of the remote control and the camera transfer back to player can happen automatically or might need to be forced. The remote control is handled locally, this is why it is important that all arguments for remoteControl, remoteControlled and isRemoteControlling commands are local. Exception is the target unit argument for remoteControl command, which can be remote, in which case the unit will be moved to player locality. When player is controlling the unit, the unit is local to player, if not, then something went terribly wrong.

Only isPlayer players can control units. Players cannot control other players. When a player takes control of a unit that is controlled by another player, the unit is transferred to the new owner and previous player control is terminated. This is unfortunate legacy behaviour we cannot safely change.

When player controls a unit and the unit dies, the control stays with that unit (another legacy behaviour). After a short time, dead unit leaves its group, in which case remoteControlled for this unit will return objNull, but isRemoteControlling for the player controlling the unit will still return true and the player will remain in remote control mode and appear to be stuck. To exit this mode, the user can execute:

and if nescessary:

Remote control can also be terminated when only unit is known:

The remoteControlled script command works both ways and can return either the controlling player or contrilled unit depending on the argument used (see command description).