Ive got it doing almost what i want now but ive been using setSpriteDepth to hide the sprite after but its not hiding the sprite until after the subroutine has been called twice ive tried sync() Update() render() and Swap()
do
// find out which sprite gets hit
if ( GetPointerPressed ( ) = 1 )
sprite = GetSpriteHit ( GetPointerX ( ), GetPointerY ( ) )
endif
If sprite >1 and sprite <= 8 then playGame(sprite)
// update the screen
sync():sprite=0
loop
function playGame(spriteNum as integer)
SetSpriteDepth (14,9998)
SetSpriteDepth ( 9, 1 )
SetSpriteDepth ( 10, 1 )
SetSpriteImage ( 14, 100 )
clearScreen()
drawSprite(14)
render()
for image=0 to spriteNum
if getImageExists(image+1) then deleteImage(image+1)
next image
for x = 0 to (spriteNum)
SetSpritePosition( 9, (x*32)-32,0 )
DrawSprite (9)
SetSpritePosition( 10, (x*32)-32,32 )
DrawSprite (10)
getImage (x+1,0,0,480,320)
SetSpriteImage ( 14, x+1 )
DrawSprite (14)
render()
next x
setSpriteDepth (9,10000)
setSpriteDepth (10,10000)
sync()
endfunction playGame
fubar