{"name":"setGroupOwner","title":"setGroupOwner","type":"command","url":"https://community.bistudio.com/wiki/setGroupOwner","revid":364895,"updated":"2024-06-29T14:38:33Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","locality":{"server_exec":true},"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.","syntaxes":[{"syntax":"group setGroupOwner clientID","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"clientID","type":"Number","description":"the machine network ID of the new owner.","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"group"},"right":{"text":"clientID"}}],"examples":[{"code":["_localityChanged = _someGroup setGroupOwner (owner _playerObject);"]}],"see_also":["owner","setOwner","groupOwner"],"notes":[{"user":"Nelis75733126","date":"2015-07-30T12:49:00Z","text":"In Arma 3 1.48, setGroupOwner only works if the group has units in it."},{"user":"TMZulu","date":"2020-04-28T22:58:00Z","text":"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.\nLocking the vehicle during transfer can counter this behavior."},{"user":"TMZulu","date":"2020-04-30T21:15:00Z","text":"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."},{"user":"TMZulu","date":"2020-04-30T21:58:00Z","text":"Locality dependent commands such as **forceSpeed** will no longer work after transfer and must be reapplied on the owning client."}]}