SETMAPDATA

Top  Previous  Next

Syntax

SETMAPDATA(map as POINTER,x as INT,y as INT,tile as INT)

Description

Sets the tile image number to display at the specified map coordinates.

Parameters

map - Map pointer returned by the NEWMAP function.

x, y - Coordinates to set the tile number.

tile - New tile image number.

Return value

None

Remarks

Each frame (tile) in an image is assigned a number starting from 0. The tile image number specifies which tile will be drawn at the specified coordinate. Coordinates are in map units which are tiles wide by tiles high.

A value less than zero or greater than the number of tiles in the image will cause that map coordinate not to be drawn when rendering with DRAWMAP. This can be used to create patterns of missing tiles and to show the background through the map.

See Also: GETMAPDATA, DRAWMAP

Example usage

SETMAPDATA mymap, 0, 0, 10