Arma 3 Scripting

setName

  • Global argument
  • Local effect
  • Arma 3 v0.50
  • First in Armed Assault v1.08

Command · also in Locations · Markdown · JSON · original wiki page

Description

Sets the name of a location or a person (person only in single player).

Syntax

Syntax 1

thing setName name

Parameters:

Returns: Nothing

Syntax 2

since arma3 1.02

unit setName [name, firstName, lastName]

Parameters:

Returns: Nothing

Examples

Example 1

myLocation setName "My Location Name";

Example 2

player setName "New Name";

Example 3

player setName ["Ben Kerry","Ben","Kerry"];

See also

name · nameSound · setNameSound · setIdentity

Community notes

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 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.