Arma 3 Scripting

Command in Groups

deleteGroup

Also available as Markdown and JSON, or read the original wiki page.

Description

Destroys the given group - the group must be empty and local to the machine executing this command.

Note

In Arma 3 you can find out locality of the group with local command, unlike with previous games. However owner and setOwner don't work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute deleteGroup where is it local.

Note

Arma 3: In Arma 3 when the last unit leaves a group, the group gets automatically deleted. Manually deleting all units from a group, however, does not automatically delete the empty group. To force the group to get auto-deleted when empty, use deleteGroupWhenEmpty.

Syntax

deleteGroup group

Parameters:

Returns: Nothing

Examples

Example 1

deleteGroup _group;

Example 2

[_group] remoteExec ["deleteGroup", groupOwner _group]; // server only

See also

deleteGroupWhenEmpty · isGroupDeletedWhenEmpty · createGroup · units · group · groupFromNetId

Community notes

ColonelSandersLite

The deleteGroup Command does not work when there are living members of in the group. It doesn't error, it simply doesn't do anything.

5133p39

Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group.

LongEnoughName

deleteGroup will only delete local groups even if called by server. Say we have a situation where client creates a group and puts a unit there and later unit dies/gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server.