Arma 3 Scripting

setGroupOwner

  • Server only
  • Arma 3 v1.40

Command · Markdown · JSON · original wiki page

Description

Changes the ownership of a group (and all its units) to a given client. The group leader must not be a player. This command only works when called from the server. Returns true if locality was changed. For agents use setOwner command.

Syntax

group setGroupOwner clientID

Parameters:

Returns: Boolean

Examples

Example 1

_localityChanged = _someGroup setGroupOwner (owner _playerObject);

See also

owner · setOwner · groupOwner

Community notes

Nelis75733126

In Arma 3 1.48, setGroupOwner only works if the group has units in it.

TMZulu

The setGroupOwner command will dismount the unit leader of a vehicle if the vehicle is stationary, likely due to the dummy waypoint used in the transfer.
Locking the vehicle during transfer can counter this behavior.

TMZulu

Using setGroupOwner may cause AI to have their loadout removed. This typically occurs when transferring multiple groups in sequence without delay. This occurs on seemingly random AI in groups. The simple but finicky solution to this is to add a sufficient delay between the transfer of groups. Alternatively, one could have the units' loadouts saved and then reloaded if the unit is shown as naked. Both of these methods may be combined as well.

TMZulu

Locality dependent commands such as forceSpeed will no longer work after transfer and must be reapplied on the owning client.