{"name":"setIdentity","operator":null,"title":"setIdentity","type":"command","url":"https://community.bistudio.com/wiki/setIdentity","revid":369141,"updated":"2024-09-03T10:34:36Z","groups":["Unit Identity"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"person","type":"Object","optional":false,"default":null,"description":"unit to which the identity will be applied","types":["Object"],"since":null,"text":"person: Object - unit to which the identity will be applied"},{"name":"identity","type":"String","optional":false,"default":null,"description":"name of the subclass in CfgIdentities","types":["String"],"since":null,"text":"identity: String - name of the subclass in CfgIdentities"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"person","types":["Object"]},"right":{"text":"identity","types":["String"]}}],"examples":[{"text":"```sqf\n_soldier1 setIdentity \"MyLittleSoldier\";\n```","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};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setFace","setName","setNameSound","setSpeaker","setPitch","addGoggles","loadIdentity","lockIdentity","Arma 3: Event Handlers","hasCustomFace"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Identity","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}