DrawMap

Category: Landscape
Since engine version: 1.0 OC

Description

Draws a dynamic map within the specified rectangle over the old landscape. This is done using the same evaluation as with Landscape.txt components.

Syntax

bool DrawMap(int x, int y, int width, int height, string map);

Parameters

x:
Left border of the rectangle in which to draw the map.
y:
Top border of the rectangle in which to draw the map.
width:
Width of the rectangle in which to draw the map.
height:
Height of the rectangle in which to draw the map.
map:
Definition of the dynamic map. The enclosing map { ... } tag must be present.

Remark

As maximum string length in C4Script is limited by internal buffers you should use DrawDefMap for very complex maps.

Example

DrawMap(0,0,LandscapeWidth(), LandscapeHeight()/2, "map Earth{overlay{mat = Earth;};};");
Fills the top half of the map with earth.
See also: DrawDefMap
Sven2, 2002-04