# Locations (scripting commands)

- [attachObject](../../commands/attachObject.md): Attaches a location to the specified object. To detach a location, attach it to objNull.
- [className](../../commands/className.md): Returns short name of location. For config class name, see configName
- [createLocation](../../commands/createLocation.md): Creates a location of the specified class and dimensions at the specified position. Classes are defined in `CfgLocationTypes`; for possible location types see Location Types.
- [deleteLocation](../../commands/deleteLocation.md): Deletes scripted location.
- [direction](../../commands/direction.md): Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).
- [drawLocation](../../commands/drawLocation.md): Used to draw locations in 2D Editor.
- [importance](../../commands/importance.md): Returns a location's importance value.
- [in](../../commands/in.md): Checks whether value is in array, unit is in vehicle, position is inside location or ANSI string is part of other ANSI string. If Unicode support is desired, see forceUnicode.
- [inArea](../../commands/inArea.md): Checks whether given position or object is inside given area. Use inAreaArray to check multiple positions/objects within area.
- [inAreaArray](../../commands/inAreaArray.md): Returns given list of Objects and/or Positions that are in the given area, area defined by a trigger, marker, location or array.
- [inAreaArrayIndexes](../../commands/inAreaArrayIndexes.md): Returns indices of positions that are within the provided area.
- [locationNull](../../commands/locationNull.md): A non-existing Location. To compare non-existent locations use isNull or isEqualTo:
- [locationPosition](../../commands/locationPosition.md): Returns the position of a location. If the location is attached to an object, that object's position is returned.
- [name](../../commands/name.md): 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.
- [nearestLocation](../../commands/nearestLocation.md): Return the closest location of specified class to a given position. Checked range is unlimited (i.e. covers the whole map).
- [nearestLocations](../../commands/nearestLocations.md): Returns an array of locations of chosen type(s) within the given radius of the given position, sorted from nearest to farthest.
- [nearestLocationWithDubbing](../../commands/nearestLocationWithDubbing.md): Find the nearest location having a non-empty speech.
- [rectangular](../../commands/rectangular.md): Checks if a location is rectangular (returns true) or elliptical (returns false).
- [setDirection](../../commands/setDirection.md): Sets the orientation of a location. The location's area and map icon (if its type uses an icon) will be rotated to this orientation.
- [setImportance](../../commands/setImportance.md): Sets the importance value of location.
- [setName](../../commands/setName.md): Sets the name of a location or a person (person only in single player).
- [setPosition](../../commands/setPosition.md): Sets the position of a location.
- [setRectangular](../../commands/setRectangular.md): Set the shape of a location to be either rectangular or elliptical. Locations default shape is elliptical.
- [setSide](../../commands/setSide.md): Sets a location's side. The default side is Unknown.
- [setSize](../../commands/setSize.md): Sets the size (radius) of a location.
- [setSpeech](../../commands/setSpeech.md): Add speech to location.
- [setText](../../commands/setText.md): Sets the text associated with a location. This text will be displayed on the game map at the location's position.
- [setType](../../commands/setType.md): Changes a location to the specified class. Location classes are defined in CfgLocationTypes.
- [size](../../commands/size.md): Returns a location's size.
- [text](../../commands/text.md): Creates a structured text containing the given plain text if argument is String. Use setAttributes to set additional attributes on the text. If the argument is location, returns location's text value (see Alt Syntax).
- [type](../../commands/type.md): Returns a string of a Location's class name or Task's name (same as taskName).
