From Bohemia Interactive Community
Revision as of 19:45, 20 April 2023 by Lou Montana (talk | contribs) (Add specifics about identical names)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description


When argument is Object, the command returns the name given to a unit using the setIdentity instruction or selected randomly by the game engine if setIdentity has not been used on the unit. If used on vehicle, name of first crew member (in order commander, driver, gunner). If used on an object, "Error: No unit" is being returned.
name returns profileName, eventually suffixed by the server in the event of identical names, e.g username/username (2).
If the provided unit is dead and has been removed from its group, its identity has then been purged to save memory and using name on it will result in a logged error.
Unit IdentityLocations


name object
object: Object
Return Value:

Alternative Syntax

name location
location: Location
Return Value:
String - the location's name. To get its textual value, use text (see Example 3)


Example 1:
_name = name player;
Example 2:
_locationName = name myLocation;
Example 3:
name nearestLocation [position player, "Hill"]; // "" text nearestLocation [position player, "Hill"]; // "Lesnoy Khrebet"

Additional Information

See also:
profileName setName setIdentity nameSound setNameSound createLocation deleteLocation locationPosition nearestLocation nearestLocations nearestLocationWithDubbing


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
Kju - c
Posted on Jan 30, 2017 - 19:42 (UTC)
Location variant appears to be only for the 3d editor.
Alef - c
Posted on Apr 14, 2009 - 01:41 (UTC)
Will return Error: No vehicle for JIP players in init.sqf, if no sleep were performed.