Here is something i just made, use the mouse and point it over the moving box, to shoot it left click
comments are welcome, as loong that you keep in mind that im a newbie
note:
No attachments needed
remstart
------------------------------------------------------------------
program name: Shoot the green box ;-) YEA!
------------------------------------------------------------------
written by:Mika J Olausse
date: 14-12-05
------------------------------------------------------------------
comments:I dont got any thing else to do :( . hehe
------------------------------------------------------------------
remend
sync on
randomize timer()
hide mouse
rem score/hit variable
score= 0
hit= 0
rem circle variables
x= 320
y= 240
speedx= 2
speedy= 2
ox= x+speedx
oy= y+speedy
rem box variables
restart_box:
x1= 10
y1= 10
x2= 20
y2= 20
speedx1= rnd(6)+3
speedy1= rnd(6)+3
speedx2= speedx1
speedy2= speedy1
ox1= x1+speedx1
ox2= x2+speedx2
oy1= y1+speedy1
oy2= y2+speedy2
return
false= 0
true= 1
Do
cls
``--
rem move the box
ox1= ox1 + speedx1
oy1= oy1 + speedy1
ox2= ox2 + speedx2
oy2= oy2 + speedy2
if oy1>480 and oy2>480:oy1=y1:oy2=y2:ox1=x1:ox2=x2:score=score-2:endif
if hit= true:score= score+1:gosub restart_box:endif
box ox1,oy1,ox2,oy2
rem control the circle
ox= mousex()
oy= mousey()
ox= ox + speedx
oy= oy + speedy
line ox-5,oy-5,ox+5,oy+5
line ox+5,oy-5,ox-5,oy+5
circle ox,oy,10
rem change the color of the box if mouse point is over it
if mouseclick()=1 and ox > ox1-x1 and ox < ox1+x1 and oy > oy1-y1 and oy < oy1+y1
ink RGB(0,255,0),0
hit= true
else
ink RGB(0,128,0),0
hit= false
endif
rem print the score
text 620,10,str$(score)
``--
sync
loop
Not that much a noob, but still a noob