Arma 3 Scripting

Command in Groups

groupId

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

Description

Returns a group's name or a unit's group ID number.

Syntax

Syntax 1

groupId group

Parameters:

Returns: String - the group's name (e.g "Alpha Red")

Syntax 2

since arma3 2.12

groupId unit

Parameters:

Returns: Number - the unit's group ID (e.g "2, taking command")

Examples

Example 1

_name = groupId group player;            // e.g "B Alpha 1-1"

Example 2

private _unitGroupId = groupId player;    // e.g 3 (number, not a string)

See also

setGroupId · setGroupIdGlobal · group