setName

From Bohemia Interactive Community
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Hover & click on the images for description

Description

Description:
Sets the name of a location or a person (person only in single player).
Groups:
Unit IdentityLocations

Syntax

Syntax:
thing setName name
Parameters:
thing: Location or Arma 3 logo black.png1.02 Object
name: String
Return Value:
Nothing

Alternative Syntax

Syntax:
unit setName [name, firstName, lastName]
Parameters:
unit: Object
name: String
firstName: String
lastName: 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:
name nameSound setNameSound setIdentity

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
Pierre MGI - c
Posted on Aug 18, 2014 - 22:15 (UTC)
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 e.g this setName "blah", nothing occurs in the command bar and the 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 the setName command.