Location: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Bit of cleaning/filling)
Line 1: Line 1:
A location is like an extended type of marker (introduced in ArmA 1.08).
{{SideTOC}}
A location is an extended type of marker. For example city names displayed on the map are locations; their information can be accessed and modified with [[:Category:Command Group: Locations|Location commands]].
 
[[Location]] notion was introduced in {{GVI|arma|1.08}}.
 
 
== Specifics ==


* Locations have a name, a side, a [[Position3D|3D position]], a 2D area, and an orientation.  
* Locations have a name, a side, a [[Position3D|3D position]], a 2D area, and an orientation.  
* They have a non-scaling map representation (icon and/or text, depending on class).
* They have a non-scaling map representation (icon and/or text, depending on class).
* They require a class definition to define basic properties that can be changed using script commands. Classes are defined in bin\Config.bin\CfgLocationTypes
* They require a class definition to define basic properties that can be changed using script commands. Classes are defined in <tt>bin\Config.bin\CfgLocationTypes</tt>
* They can be attached to objects, with all of the location's relevant properties inherited from the object
* They can be attached to objects, with all of the location's relevant properties inherited from the object
* They can use [[setVariable]] and [[getVariable]], but only works with user made locations [http://feedback.arma3.com/view.php?id=10875]
* They can use [[setVariable]] and [[getVariable]], '''but this only works with user made locations'''
* Locations are local in MP, their properties are not synchronized
* Locations are [[Multiplayer_Scripting#Locality|local]] in MP, their properties are not synchronized
* Existing locations are set in an islands .pew file. When the island is exported to .wrp the islandname.hpp is also produced - this contains the location names used in the .pew file.  This .hpp is then incorporated into the config for the island using an [[PreProcessor_Commands#.23include|#include]] statement.<br>This section included in the island config ensures any locations set in the .pew file are included the island during packing.
* Existing locations are set in an islands .pew file. When the island is exported to .wrp the islandname.hpp is also produced - this contains the location names used in the .pew file.  This .hpp is then incorporated into the config for the island using an [[PreProcessor_Commands#.23include|#include]] statement.<br>This section included in the island config ensures any locations set in the .pew file are included in the island during packing.
* A terrain config can not be changed using the location script commands, but they can be found and read. This provides a single command method of finding nearby high points, towns, etc.
* A terrain config can not be changed using the location script commands, but they can be found and read. This provides a single command method of finding nearby high points, towns, etc.




== Location Types ==
== Location Types ==


[[Image:LocationTypes.JPG|right|thumb|Location Types (ArmA)]]
[[Image:LocationTypes.JPG|right|thumb|Location Types (ArmA)]]
=== Armed Assault ===
=== Armed Assault ===
Possible location types are:
Possible location types are:
* Mount
* Mount
Line 37: Line 41:
[[Image:Arma2_CfgLocationTypes.jpg|right|thumb|Location icons and fonts (Arma 2)]]
[[Image:Arma2_CfgLocationTypes.jpg|right|thumb|Location icons and fonts (Arma 2)]]
=== Arma 2 ===
=== Arma 2 ===
* Name
* Name
* Strategic
* Strategic
Line 59: Line 62:
* VegetationPalm
* VegetationPalm
* VegetationVineyard
* VegetationVineyard


=== Arma 3 ===
=== Arma 3 ===
* NameCity
* NameCity
* NameCityCapital
* NameCityCapital
Line 72: Line 73:
* Airport (On Tanoa only. Tanoan airports have their own location type. On Altis and Stratis, airports are '''NameLocal''')
* Airport (On Tanoa only. Tanoan airports have their own location type. On Altis and Stratis, airports are '''NameLocal''')


== Location Related Scripting Commands ==
See [[:Category:Command_Group:_Locations]]
[[createLocation]], [[deleteLocation]], [[nearestLocations]], [[nearestLocation]], [[position]], [[getPos]], [[locationPosition]], [[direction]], [[size]], [[type]], [[importance]], [[name]], [[className]], [[text]], [[rectangular]], [[attachedObject]], [[side]], [[isNull]], [[locationNull]], [[nearestLocationWithDubbing]], [[in]], [[drawLocation]], [[setPosition]], [[setDirection]], [[setSize]], [[setType]], [[setImportance]], [[setName]], [[setText]], [[setRectangular]], [[attachObject]], [[setSide]], [[setVariable]], [[getVariable]], [[distance]], [[distanceSqr]]


[[Category: Data Types]]
[[Category: Data Types]]

Revision as of 11:32, 17 March 2019

Template:SideTOC A location is an extended type of marker. For example city names displayed on the map are locations; their information can be accessed and modified with Location commands.

Location notion was introduced in -wrong parameter ("Arma") defined!-1.08.


Specifics

  • Locations have a name, a side, a 3D position, a 2D area, and an orientation.
  • They have a non-scaling map representation (icon and/or text, depending on class).
  • They require a class definition to define basic properties that can be changed using script commands. Classes are defined in bin\Config.bin\CfgLocationTypes
  • They can be attached to objects, with all of the location's relevant properties inherited from the object
  • They can use setVariable and getVariable, but this only works with user made locations
  • Locations are local in MP, their properties are not synchronized
  • Existing locations are set in an islands .pew file. When the island is exported to .wrp the islandname.hpp is also produced - this contains the location names used in the .pew file. This .hpp is then incorporated into the config for the island using an #include statement.
    This section included in the island config ensures any locations set in the .pew file are included in the island during packing.
  • A terrain config can not be changed using the location script commands, but they can be found and read. This provides a single command method of finding nearby high points, towns, etc.


Location Types

Location Types (ArmA)

Armed Assault

Possible location types are:

  • Mount
  • Name
  • NameMarine
  • NameCityCapital
  • NameCity
  • NameVillage
  • NameLocal
  • Hill
  • ViewPoint
  • RockArea
  • BorderCrossing
  • VegetationBroadleaf
  • VegetationFir
  • VegetationPalm
  • VegetationVineyard


Location icons and fonts (Arma 2)

Arma 2

  • Name
  • Strategic
  • StrongpointArea
  • FlatArea
  • FlatAreaCity
  • FlatAreaCitySmall
  • CityCenter
  • Airport
  • NameMarine
  • NameCityCapital
  • NameCity
  • NameVillage
  • NameLocal
  • Hill
  • ViewPoint
  • RockArea
  • BorderCrossing
  • VegetationBroadleaf
  • VegetationFir
  • VegetationPalm
  • VegetationVineyard

Arma 3

  • NameCity
  • NameCityCapital
  • NameMarine
  • NameVillage
  • NameLocal (Will return names like Airport)
  • Hill
  • Mount
  • Airport (On Tanoa only. Tanoan airports have their own location type. On Altis and Stratis, airports are NameLocal)