{"name":"groupId","operator":null,"title":"groupId","type":"command","url":"https://community.bistudio.com/wiki/groupId","revid":337336,"updated":"2023-01-18T11:45:01Z","groups":["Groups"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns a group's name or a unit's group ID number.","syntaxes":[{"syntax":"groupId group","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"Group","optional":false,"default":null,"description":null,"types":["Group"],"since":null,"text":"group: Group"}],"returns":{"type":"String","types":["String"],"description":"the group's name (e.g \"Alpha Red\")","text":"String - the group's name (e.g \"Alpha Red\")"},"form":"unary","operator":null,"left":null,"right":{"text":"group","types":["Group"]}},{"syntax":"groupId unit","since":"arma3 2.12","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"a group's unit","types":["Object"],"since":null,"text":"unit: Object - a group's unit"}],"returns":{"type":"Number","types":["Number"],"description":"the unit's group ID (e.g \"2, taking command\")","text":"Number - the unit's group ID (e.g \"**2**, taking command\")"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\n_name = groupId group player;            // e.g \"B Alpha 1-1\"\n```","code":["_name = groupId group player;\t\t\t// e.g \"B Alpha 1-1\""]},{"text":"```sqf\nprivate _unitGroupId = groupId player;    // e.g 3 (number, not a string)\n```","code":["private _unitGroupId = groupId player;\t// e.g 3 (number, not a string)"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setGroupId","setGroupIdGlobal","group"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Groups","Introduced with Arma 3 version 0.50","Scripting Commands"]}