Language

Map.addSprite


Map.addSprite(string id, int depth, int x, int y, int width, int height, string texture, int type, bool custom_texture)

Description

Add a sprite to the map.

Parameters

id
Unique ID of the entity.
depth
The depth of the entity. Between 0 and 20.
x
X coordinate.
y
Y coordinate.
width
Width of the sprite. Image will be tiled.
height
Height of the sprite. Image will be tiled.
texture
The name of the texture file.
type
The type. 0 = Solid. 1 = Artwork. 2 = Kill on touch. 3 = Solid from top.
custom_texture
Set to true if the texture is shipped with your map (sprites/ directory).