Quote: "This command is now obsolete"
Yes, it was taken out for a while, but is back in now, with the newer versions.
EDIT: If you would post your media, we could all check the code. Aside from that, I'll check with "alternative" media.
This code works, but it uses alternative media. As Hodgey suggests, including sync commands makes sure you show your sprites when you want them to be seen.
Hide Mouse
set display mode 800,600,32
sync on
sync rate 72
Global back As Integer = 1
Global plane As Integer = 2
Global missile As Integer = 3
Global ufo As Integer = 4
Global explode As Integer = 5
Global ang As Word
Global ufoX As Float
Global ufoY As Float
Global ufoXamt As Float
Global ufoYamt As Float
Global explosionX As Float
Global explosionY As Float
loadGraphics()
paste image back,0,0
set sprite plane,1,1
Do
checkInput()
handleUfo()
testCollisions()
sync
Loop
Function loadGraphics()
`Load Image "Space.bmp",back
for nStar = 1 to 1000
dot rnd(800),rnd(600),rgb(255,255,255)
next nStar
get image back,0,0,800,600
`Load Image "Ship.bmp",plane
cls 0
box 0,0,64,64
get image plane,0,0,64,64
Sprite plane,400,550,plane
OffSet Sprite plane,32,32
`Load Image "Ufo.bmp",ufo
ink rgb(0,0,255),0
box 0,0,64,64
get image ufo,0,0,64,64
Sprite ufo,900,750,ufo
`Load Image "Missile.bmp",missile
cls 0
ink rgb(255,255,0),0
box 0,0,24,10
get image missile,0,0,24,10
Sprite missile,900,800,missile
OffSet Sprite missile,12,5
`Load Image "Explode.bmp",explode
cls 0
ink rgb(255,0,0),0
box 0,0,64,64
get image explode,0,0,64,64
cls 0
Sprite explode,900,850,explode
EndFunction
Function handleUfo()
ufoY = 50
ufoXamt = 2
ufoX = ufoX + ufoXamt
If ufoX > 800 Then ufoX = 0
Sprite ufo,ufoX,ufoY,ufo
sync
EndFunction
Function checkInput()
If SpaceKey()
fireBullet()
EndIf
EndFunction
Function fireBullet()
x = 408
y = 550
Repeat
handleUfo()
y = y - 15
Sprite missile,x,y,missile
sync
testCollisions()
Until y < -15
EndFunction
Function testCollisions()
If Sprite Collision(missile,ufo)
Hide Sprite ufo
Hide Sprite missile
Sprite explode,ufoX,ufoY,explode
sync
EndIf
EndFunction