remoteControlled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Fix phrasing)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.14
|version1= 2.14
|branch= dev
 
|arg= local
|arg= local
|gr1= Remote Control
|gr1= Remote Control


|descr= Returns the player controlling the given unit if the argument is the unit or the unit controlled by the player if the argument is the player.
|descr= Returns the player controlling the given unit if the argument is the unit, or the unit controlled by the player if the argument is the player.
{{Feature|important|The argument must be local}}
{{Feature|important|See also [[Remote Control Tutorial]].}}


|s1= [[remoteControlled]] unitOrPlayer
|s1= [[remoteControlled]] unitOrPlayer
Line 14: Line 14:
|p1= unitOrPlayer: [[Object]] - unit under remote control or the player controlling a unit
|p1= unitOrPlayer: [[Object]] - unit under remote control or the player controlling a unit


|r1= [[Object]] - the person controlling the unit or the uniot controlled by the player (see description) or [[objNull]]
|r1= [[Object]] - the person controlling the unit or the unit controlled by the player; [[objNull]] if not applicable
 
|x1= <sqf>private _controllingPlayer = remoteControlled _dronePilot;</sqf>


|x1= <sqf>_player = remoteControlled _bob;</sqf>
|x2= <sqf>private _dronePilot = remoteControlled _controllingPlayer;</sqf>
|x2= <sqf>_bob = remoteControlled _player;</sqf>


|seealso= [[remoteControl]] [[isRemoteControlling]]
|seealso= [[remoteControl]] [[isRemoteControlling]]
}}
}}

Latest revision as of 15:24, 16 November 2023

Hover & click on the images for description

Description

Description:
Returns the player controlling the given unit if the argument is the unit, or the unit controlled by the player if the argument is the player.
Groups:
Remote Control

Syntax

Syntax:
remoteControlled unitOrPlayer
Parameters:
unitOrPlayer: Object - unit under remote control or the player controlling a unit
Return Value:
Object - the person controlling the unit or the unit controlled by the player; objNull if not applicable

Examples

Example 1:
private _controllingPlayer = remoteControlled _dronePilot;
Example 2:
private _dronePilot = remoteControlled _controllingPlayer;

Additional Information

See also:
remoteControl isRemoteControlling

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