drawSheet()
Purpose
Draw a tile from a tiled image
Description
Draw the specified tile number from a tiled image at the specified location and size
Syntax
drawSheet( handle, tileno, { xpos, ypos, width, height } )
Arguments
handle Variable which stores the desired image file
tileno Tile number to display (zero based)
xpos Horizontal screen position in pixels
ypos Vertical screen postion in pixels
width Desired on-screen width in pixels
height Desired on-screen height in pixels
Example
image = loadImage( "Untied Games/Enemy A", false )
pos = { gwidth() / 2, gheight() / 2 }
loop
for i = 0 to 4 loop
clear()
drawImage( image, 0, 0, 1 )
drawSheet( image, i, { pos.x - 100, pos.y - 100, 200, 200 } )
update()
sleep( 0.1 )
repeat
repeat
Associated Commands
clear(), createImage(), drawImage(), drawImageEx(), drawQuad(), loadImage(), update(), uploadImage()