I am making a simple game where if your mouse hits something, game over. the only problem is that i cant get the collision to work.
REM Project: RTs
REM Created: 19/10/2005 16:35:37
REM
REM ***** Main Source File *****
REM
do
start:
dark_orange=rgb(255,165,0)
orange_red=rgb(255,69,0)
red=rgb(255,0,0)
box 1,1,300,250,dark_orange,orange_red,orange_red,dark_orange
box 300,250,700,600,dark_orange,orange_red,orange_red,dark_orange
box 150,100,450,400,0,orange_red,orange_red,0
box 225,175,325,225,red,red,red,red
set cursor 250,200
print "clicky"
if mousex()>225
if mousex()<325
if mousey()>175
if mousey()<225
if mouseclick()=1
goto game
endif
endif
endif
endif
endif
loop
game:
score=0
high_score=0
load image "red.jpg",1
load image "grey.jpg",2
rem cursor
sprite 1,mousex(),mousey(),1
scale sprite 1,5
hide sprite 1
hide mouse
rem enemey
sprite 2,5,400,2
scale sprite 2,5
rem hide sprite 2
rem score
do
rem the cursor
paste sprite 1,mousex(),mousey()
rem enemy
rem paste sprite 2,5,400
rem the score
set cursor 450,5
print "score:"
set cursor 410,20
print "high score:"
set cursor 500,5
print score/100
set cursor 500,20
print high_score/100
if score>high_score
high_score=score
endif
if timer()>(timer()-100)
score=score+1
endif
if sprite hit (1,0)=1
set cursor 200,200
print "GAME OVER"
score=0
endif
loop
wait key
can anyone help?