setName: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (template:command argument fix)
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Sets the name of a location or a person. In Arma 3 this can be used to set [[name]] of a person but only in single player. |= Description
| Sets the name of a location or a person. In Arma 3 this can be used to set [[name]] of a person but only in single player. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| object '''setName''' name |= Syntax
| object '''setName''' name |SYNTAX=


|p1= object: [[Object]] |= Parameter 1
|p1= object: [[Object]] |PARAMETER1=
|p2= name: [[String]] |= Parameter 2
|p2= name: [[String]] |PARAMETER2=


|[[Nothing]] |= Return value
|[[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|s2= unit '''setName''' [name, firstName, lastName] |= Alternative Syntax
|s2= unit '''setName''' [name, firstName, lastName] |= Alternative Syntax


|p21= unit: [[Object]] |= Parameter 1
|p21= unit: [[Object]] |PARAMETER1=
  |p22= [name, firstName, lastName]: [[Array]] |=
  |p22= [name, firstName, lastName]: [[Array]] |=
|p23= name: [[String]] |= Parameter 2
|p23= name: [[String]] |PARAMETER2=
|p24= firstName: [[String]] |= Parameter 3
|p24= firstName: [[String]] |PARAMETER3=
|p25= lastName: [[String]] |= Parameter 4
|p25= lastName: [[String]] |PARAMETER4=


|r2= [[Nothing]] |= Return value
|r2= [[Nothing]] |RETURNVALUE=


|s3= location '''setName''' name |= Syntax
|s3= location '''setName''' name |SYNTAX=


|p41= location: [[Location]] |= Parameter 1
|p41= location: [[Location]] |PARAMETER1=
|p42= name: [[String]] |= Parameter 2
|p42= name: [[String]] |PARAMETER2=


|r3=[[Nothing]] |= Return value
|r3=[[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>myLocation [[setName]] "My Location Name";</code> |= Example 1
|x1= <code>myLocation [[setName]] "My Location Name";</code> |EXAMPLE1=
|x2= <code>[[player]] [[setName]] "New Name";</code> |= Example 2
|x2= <code>[[player]] [[setName]] "New Name";</code> |EXAMPLE2=
|x3= <code>[[player]] [[setName]] ["Ben Kerry","Ben","Kerry"];</code> |= Example 3
|x3= <code>[[player]] [[setName]] ["Ben Kerry","Ben","Kerry"];</code> |EXAMPLE3=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[name]], [[nameSound]], [[setNameSound]], [[setIdentity]] |= See also
| [[name]], [[nameSound]], [[setNameSound]], [[setIdentity]] |SEEALSO=


}}
}}

Revision as of 14:47, 7 April 2019

-wrong parameter ("Arma") defined!-1.08
Hover & click on the images for description

Description

Description:
Sets the name of a location or a person. In Arma 3 this can be used to set name of a person but only in single player.
Groups:
Uncategorised

Syntax 1

Syntax:
object setName name
Parameters:
object: Object
name: String
Return Value:
Nothing

Syntax 2

Syntax:
unit setName [name, firstName, lastName]
Parameters:
unit: Object
[name, firstName, lastName]: Array
name: String
firstName: String
lastName: String
Return Value:
Nothing

Syntax 3

Syntax:
location setName name
Parameters:
location: Location
name: String
Return Value:
Nothing

Examples

Example 1:
myLocation setName "My Location Name";
Example 2:
player setName "New Name";
Example 3:
player setName ["Ben Kerry","Ben","Kerry"];

Additional Information

See also:
namenameSoundsetNameSoundsetIdentity

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

Notes

Posted on July 9, 2010‎
kju
Appears to be only for the 3d editor.
Posted on September 19, 2013‎
Druid
Support of a person as the first parameter from Arma 3 v. 1.02.
Posted on April 12, 2014
Waffle SS.
Seems to have no effect on players in Multiplayer. (ArmA 3 v1.00)
Posted on August 18, 2014
Pierre MGI
Only last name will appear in command bar i.e. this setname _mynameArray will display _mynameArray select 2. If setname is used with a string : this setname "blah", nothing occurs in command bar and default randomized name is displayed.

Dealing with the units' names in a script, _x (in a foreach units group, for example) will return the "object" as B ALFA 4-1:2 or the name written in ai unit name field in editor (if exists). This context is rather a "variable name" for each object (ai) than an "identity name" as given via setname function.

Bottom Section