setGroupOwner: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.40 | |1.40 | ||
|gr1 = Multiplayer | |gr1 = Multiplayer | ||
Line 11: | Line 11: | ||
|serverExec= server | |serverExec= server | ||
| 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. | | 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. | ||
| group [[setGroupOwner]] clientID | | group [[setGroupOwner]] clientID | ||
|p1= group: [[Group]] - | |p1= group: [[Group]] - | ||
|p2= clientID: [[Number]] - the [[Multiplayer_Scripting#Machine_network_ID | machine network ID]] of the new [[owner]]. | |p2= clientID: [[Number]] - the [[Multiplayer_Scripting#Machine_network_ID | machine network ID]] of the new [[owner]]. | ||
|p3 | |p3= | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code>_localityChanged = _someGroup [[setGroupOwner]] ([[owner]] _playerObject);</code> | |x1= <code>_localityChanged = _someGroup [[setGroupOwner]] ([[owner]] _playerObject);</code> | ||
| [[owner]], [[setOwner]], [[groupOwner]] | | [[owner]], [[setOwner]], [[groupOwner]] | ||
}} | }} | ||
Revision as of 11:08, 18 January 2021
Description
- 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.
- Groups:
- Multiplayer
Syntax
- Syntax:
- group setGroupOwner clientID
- Parameters:
- group: Group -
- clientID: Number - the machine network ID of the new owner.
- Return Value:
- Boolean
Examples
- Example 1:
_localityChanged = _someGroup setGroupOwner (owner _playerObject);
Additional Information
- See also:
- ownersetOwnergroupOwner
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
- Posted on July 30, 2015 - 12:49 (UTC)
- IT07
- In ArmA3 1.48, setGroupOwner does NOT work if group has no units
- Posted on April 28, 2020 - 22:58 (UTC)
- 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.
- Posted on April 30, 2020 - 21:15 (UTC)
- 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.
- Posted on April 30, 2020 - 21:58 (UTC)
- TMZulu
- Locality dependent commands such as forceSpeed will no longer work after transfer and must be reapplied on the owning client.