{"name":"setGroupIcon","operator":null,"title":"setGroupIcon","type":"command","url":"https://community.bistudio.com/wiki/setGroupIcon","revid":376586,"updated":"2025-10-29T23:11:37Z","groups":["High Command"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets group icon properties. Since Arma 3 v2.22 the offset can be set separately for 2d and 3d.","syntaxes":[{"syntax":"group setGroupIcon [id, icon, offset]","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"Group","optional":false,"default":null,"description":null,"types":["Group"],"since":null,"text":"group: Group"},{"name":"id","type":"Number","optional":false,"default":null,"description":"the icon ID returned by addGroupIcon","types":["Number"],"since":null,"text":"id: Number - the icon ID returned by addGroupIcon"},{"name":"icon","type":"String","optional":false,"default":null,"description":"class name of desired icon from CfgGroupIcons","types":["String"],"since":null,"text":"icon: String - class name of desired icon from CfgGroupIcons"},{"name":"offset","type":"Array","optional":true,"default":"[0,0]","description":"X and Y offsets of the icon in form [offsetX, offsetY, (offsetX3d), (offsetY3d)]","types":["Array"],"since":null,"text":"offset: Array - (Optional, default [0,0]) X and Y offsets of the icon in form [offsetX, offsetY, (offsetX3d), (offsetY3d)]"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"group","types":["Group"]},"right":{"text":"[id, icon, offset]","types":["Array"]}}],"examples":[{"text":"```sqf\n_target setGroupIcon [_icon, \"hc_selectedEnemy\"];\n_target setGroupIcon [_icon, \"flag\"];\n\n_group setGroupIcon [_icon, _iconsClass, _offset];\n```","code":["_target setGroupIcon [_icon, \"hc_selectedEnemy\"];\n_target setGroupIcon [_icon, \"flag\"];\n\n_group setGroupIcon [_icon, _iconsClass, _offset];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIcons","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: High Command","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}