setIdentity: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "‎" to "")
 
(86 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
____________________________________________________________________________________________
|version2= 1.00


| Set identity of person.
|game3= arma1
Identities are defined in [[Description.ext]] of the mission or campaign. |= Description
|version3= 1.00
____________________________________________________________________________________________


| person '''setIdentity''' identity |= Syntax
|game4= arma2
|version4= 1.00


|p1= person: [[Object]] |= Parameter 1
|game5= arma2oa
|version5= 1.50


|p2= identity: [[String]] |= Parameter 2
|game6= tkoh
|version6= 1.00


| [[Nothing]] |= Return value
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50
 
|x1= <pre>soldier1 setIdentity "John_Doe"</pre> |= Example 1
____________________________________________________________________________________________


| |= See also
|arg= global


}}
|eff= local
 
|gr1= Unit Identity
 
|descr= Sets identity of a person. The identities could be defined in a custom config in [[Description.ext#CfgIdentities|Description.ext]] or in the main config. For a list of available main config values see [[CfgIdentities]].
<br><br>
This 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]].
 
|s1= person [[setIdentity]] identity


<h3 style="display:none">Notes</h3>
|p1= person: [[Object]] - unit to which the identity will be applied
<dl class="command_description">
|p2= identity: [[String]] - name of the subclass in [[CfgIdentities]]
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|r1= [[Nothing]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>_soldier1 setIdentity "MyLittleSoldier";</sqf>
Old Notes (temporary):


The definition format in the [[Description.ext]] file is: class CfgIdentities
|x2= Clone factory in MP:
<sqf>for "_i" from 1 to 10 do
{
{
class John_Doe
_bob = group player createUnit [typeOf player, position player, [], 0, "none"];
{
[_bob, "MyLittleSoldier"] remoteExec ["setIdentity", 0, _bob];
name="John Bartholemew Doe";
};</sqf>
face="Face20";
 
glasses="None";
|seealso= [[setFace]] [[setName]] [[setNameSound]] [[setSpeaker]] [[setPitch]] [[addGoggles]] [[loadIdentity]] [[lockIdentity]] [[Arma_3:_Event_Handlers#HandleIdentity | HandleIdentity EH]]
speaker="Dan";
}}
pitch=1.1;
};
}; Name can be any string
Face can take any of the following values:
Male: "Face1"... to "Face52", "Face99" & "FaceR01" to "Face R04"
Female: "Eva", "Kamila", "Lada", "Lucie", "Marketa" & "Nada"
Glasses can take the following values: "None", "Spectacles" & "Sunglasses"
Speaker determines which voice is used and can take any of the following values:
"Adam","Dan","George","Greg","John","Jonah","Marc","Patrick","Paul","Peter","Rich","Rob","Ted","Tom","Nikolai","Vitaliy","Sergey","Oleg",
"Ruslan","Aleksei","Andrei","Boris","Georgiy","Vadim","Vladimir","Ivan"
Pitch sets the tone of voice. 1.0 for normal; < 1.0 for deep; >1.0 for high pitched
[[Category:Scripting Commands|SETIDENTITY]]
[[Category:Scripting Commands OFP 1.96|SETIDENTITY]]
[[Category:Scripting Commands OFP 1.46|SETIDENTITY]]
[[Category:Scripting Commands ArmA|SETIDENTITY]]

Latest revision as of 12:54, 26 April 2023

Hover & click on the images for description

Description

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.

This 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.
Groups:
Unit Identity

Syntax

Syntax:
person setIdentity identity
Parameters:
person: Object - unit to which the identity will be applied
identity: String - name of the subclass in CfgIdentities
Return Value:
Nothing

Examples

Example 1:
_soldier1 setIdentity "MyLittleSoldier";
Example 2:
Clone factory in MP:
for "_i" from 1 to 10 do { _bob = group player createUnit [typeOf player, position player, [], 0, "none"]; [_bob, "MyLittleSoldier"] remoteExec ["setIdentity", 0, _bob]; };

Additional Information

See also:
setFace setName setNameSound setSpeaker setPitch addGoggles loadIdentity lockIdentity HandleIdentity EH

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note