Description
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.
The alternative syntax allows to convert a non-editable (built-in) terrain location into an editable one, with the following restrictions:
- it cannot be deleted (but can be setType to "Invisible" to hide it)
- it cannot be moved
Syntax
Syntax 1
createLocation [className, position, sizeX, sizeY]
Parameters:
className: Stringposition: Position2D, Position3D or ObjectsizeX: Number - in meterssizeY: Number - in meters
Returns: Location
Syntax 2
since arma3 2.10
createLocation [location]
Parameters:
location: Location - a terrain's location. If a scripted location is provided, it is simply returned
Returns: Location - a script-editable location
Examples
Example 1
_location = createLocation ["NameVillage", [4035,2151,10], 100, 100];
Example 2
_location = createLocation ["NameVillage", [4035,2151,10], 30, 30];
_location setText "Player town";
Example 3
private _terrainLocation = nearestLocation [player, "nameCity"]; // assuming it returns a built-in location
_terrainLocation setType "Invisible"; // does not do anything
private _editableLocation = createLocation [_terrainLocation]; // does the conversion
_editableLocation setType "Invisible"; // hides the location
See also
setText · nearestLocation · nearestLocations · locationPosition · nearestLocationWithDubbing · setRectangular · rectangular · size