{"name":"roleDescription","operator":null,"title":"roleDescription","type":"command","url":"https://community.bistudio.com/wiki/roleDescription","revid":329074,"updated":"2022-07-21T23:46:21Z","groups":["Object Manipulation","Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.48"}],"since":{"game":"arma3","name":"Arma 3","version":"1.48"},"arma3_since":"1.48","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns unit description set in the editor and visible on role selection screen in multiplayer.","syntaxes":[{"syntax":"roleDescription unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"String","types":["String"],"description":null,"text":"String"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\n_playerRole = roleDescription player;\n```","code":["_playerRole = roleDescription player;"]}],"multiplayer":null,"problems":"**Does not** work in single player.","aliases":[],"see_also":["name","getPlayerUID","vehicleVarName","worldName","briefingName","missionName","serverName"],"notes":[{"user":"Killzone_Kid","date":"2015-06-29T12:05:00Z","text":"One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription."},{"user":"Pierre MGI","date":"2017-05-26T01:10:00Z","text":"roleDescription works for playableUnits only. That means not on AI disabled in lobby and not in SP (even for player)."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Command Group: Object Manipulation","Introduced with Arma 3 version 1.48","Scripting Commands"]}