Location

From Bohemia Interactive Community
Revision as of 11:39, 28 November 2007 by Suma (talk | contribs) (Attached means linked, not updated)
Jump to navigation Jump to search

A location is like an extended type of marker. I don't know when the commands were introduced, but I found them in 1.08.

  • Locations have a name, a side, a 3D position, an 2D area, and an orientation.
  • They have a non-scaling map representation (icon &/or text, depending on class).
  • They require a class definition to define basic properties that cannot be changed using script commands (text size, font, colour, icon type). 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.
  • 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 i.e.:

class Names { #include "islandname.hpp" };

This section included in the island config ensures any locations set in the .pew file are included in the resulting ODOL .wrp file during packing. A terrain's 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.