{"name":"setIdentity","title":"setIdentity","type":"command","url":"https://community.bistudio.com/wiki/setIdentity","revid":369141,"updated":"2024-09-03T10:34:36Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets identity of a person. The identities could be defined in a custom config in Description.ext or in the main config. For a list of available main config values see CfgIdentities.\n\nThis command is an aggregate of the following commands: setName, setFace, setSpeaker, setNameSound, setPitch, only the values are loaded from the given config. It also includes value for glasses for which currently there is no direct command, instead there is an inventory command addGoggles.","syntaxes":[{"syntax":"person setIdentity identity","params":[{"name":"person","type":"Object","description":"unit to which the identity will be applied","type_expr":"Object"},{"name":"identity","type":"String","description":"name of the subclass in CfgIdentities","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"identity"}}],"examples":[{"code":["_soldier1 setIdentity \"MyLittleSoldier\";"]},{"text":"Clone factory in MP:\n\n```sqf\nfor \"_i\" from 1 to 10 do\n{\n    _bob = group player createUnit [typeOf player, position player, [], 0, \"none\"];\n    [_bob, \"MyLittleSoldier\"] remoteExec [\"setIdentity\", 0, _bob];\n};\n```","code":["for \"_i\" from 1 to 10 do\n{\n\t_bob = group player createUnit [typeOf player, position player, [], 0, \"none\"];\n\t[_bob, \"MyLittleSoldier\"] remoteExec [\"setIdentity\", 0, _bob];\n};"]}],"see_also":["setFace","setName","setNameSound","setSpeaker","setPitch","addGoggles","loadIdentity","lockIdentity","Arma 3: Event Handlers","hasCustomFace"]}