sorry to bother this site with this code again, but I need help with the sprite collison code at the bottom...
set display mode 640,480,32
sync rate 0
sync on
load image "title.bmp",1
load image "tomfront.bmp",2
load image "tomback.bmp",3
load image "tomside(left).bmp",4
load image "tomside(right).bmp",5
load image "room1.bmp",6
load image "startmenu.bmp",7
load image "weaponscreen.bmp",8
load image "handgun.bmp",9
load image "handgun1.bmp",10
load image "shotgun.bmp",11
sprite 9,200,20,9
hide sprite 9
charx = 200
chary = 300
sprite 1,charx,chary,2
hide sprite 1
paste image 1,0,0
title = 1
while title=1
if mousex()>183 and mousex()<336 and mousey()>431 and mousey()<470
if mouseclick()>0
paste image 6,0,0
title = 0
hide mouse
show sprite 9
show sprite 1
endif
endif
sync
endwhile
`Beginning Game Properties
do
`GamePlay
menu=0
if menu=0 and upkey()>0
chary = chary - 1
sprite 1,charx,chary,3
endif
if menu=0 and downkey()>0
chary = chary + 1
sprite 1,charx,chary,2
endif
if menu=0 and leftkey()>0
charx = charx - 1
sprite 1,charx,chary,4
endif
if menu=0 and rightkey()>0
charx = charx + 1
sprite 1,charx,chary,5
endif
if title=0 and menu=0 and returnkey()=1
sprite 6,0,0,7
menu=1
show mouse
sprite 7,0,0,8
hide sprite 7
endif
if mousex()>38 and mousex()<192 and mousey()>217 and mousey()<283 and mouseclick()>0
show sprite 7
menu=2
endif
if mousex() > 429 and mousex() < 583 and mousey() > 217 and mousey() < 283 and mouseclick() > 0
end
endif
if inkey$() = "q"
delete sprite 6
delete sprite 7
menu=0
hide mouse
endif
if sprite exist(9)=1 and sprite collision(2,9)=1 or sprite collision(3,9)=1 or sprite collision(4,9)=1 or sprite collision(5,9)=1 or
delete sprite 9
endif
sync
loop
To be or not to be-that is the question. Whether tis nobler in the mind to suffer the slings and arrows of outragous fortune...Well you know the rest...And if you don't, YOU SHOULD!!