Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:

Overlays a shapefile on top of the terrain.

Shapefiles are visible in first person player mode, as well as in the RTE.

The file can be located in any subfolder beneath the VBS2 profile directory (but is normally called Shapes - for example, \My Documents\VBS2\Shapes).

Both, the name of the subfolder, and the shape file (including extension) have to be provided, with a double backslash between the path and the file name (for example, "Shapes\\shape1.shp").

Be aware that is is possible to load the same shape twice, and unloading it will only remove the one added last!

Note: In V1.60, only Polygons are supported. Polylines are not drawn.

Syntax

Syntax:loadShape [shapepath]
Parameters:
Return Value:Number - Index (in ListShapeFiles) of the newly added shape (-1, if the shape could not be loaded).

Alternative Syntax

Syntax:loadShape [posx,posy,shapepath]
Parameters:
  • posx: Number - Alternative X coordinate to use as map origin.
  • posy: Number - Alternative Y coordinate to use as map origin.
  • shapepath: String - Path.
Return Value:Number - Index (in ListShapeFiles) of the newly added shape (-1, if the shape could not be loaded).

Examples

Examples:
"_shape = loadShape ["shapes\shape1.shp"] 
"_shape = loadShape [400000,4000000,"\specialShapes\\shape2.shp"] "

Additional Information

See also: ListShapeFiles
Multiplayer: 
Problems: 

Notes