setName
Jump to navigation
Jump to search
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 1.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:
- Example 3:
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
- 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.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.08
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Unit Identity
- Command Group: Locations
- Scripting Commands: Local Effect