Computer Science Canada Mouse beep test |
Author: | r.m_spy [ Sat Apr 19, 2008 6:20 pm ] |
Post subject: | Mouse beep test |
setscreen("graphics:max,max") setscreen("title:Mouse.BEEP.Text") var x,y,btn,l,di,exi,sc,s:int l:=100 exi:=0 s:=0 sc:=1 di:=1 loop delay(100) cls put" put your mouse at start" Mouse.Where(x,y,btn) drawfillbox(0,0,10,maxy,black) drawfillbox(maxx,0,maxx-10,maxy,black) exit when x<10 end loop loop delay(10) cls put" score:",sc,".",s," ",l," ".. if di=1 then put"direction:right" elsif di=2 then put"direction:left" end if Mouse.Where(x,y,btn) drawfillbox(0,0,10,maxy,black) drawfillbox(maxx,0,maxx-10,maxy,black) if l<0 then if di=1 then di:=2 if x>maxx-10 then if sc=1 then l:=l+100-s*5 elsif sc=2 then l:=l+50-s*3 elsif sc=3 then l:=l+30-s*2 elsif sc=4 then l:=l+20-s*2 end if s:=s+1 sound(200,10) else exi:=1 end if elsif di=2 then di:=1 if x<10 then if sc=1 then l:=l+100-s*5 elsif sc=2 then l:=l+50-s*3 elsif sc=3 then l:=l+30-s*2 elsif sc=4 then l:=l+20-s*2 end if s:=s+1 sound(200,10) else exi:=1 end if end if end if l:=l-1 if s=10 then sc:=sc+1 s:=0 if sc=2 then l:=50 elsif sc=3 then l:=20 elsif sc=4then l:=10 end if sound(300,10) sound(250,10) sound(200,30) end if exit when exi=1 or sc=5 end loop cls put"score:",sc,".",s if sc=5 then put"you won" end if |
Author: | darkangel [ Sun Apr 20, 2008 5:08 pm ] |
Post subject: | Re: Mouse beep test |
Because the screen flashes it doesn't pick up that my mouse is touching the finish line. use the View.Set ("offscreenonly") and the View.Update commands to fix that. |
Author: | Tallguy [ Tue Apr 22, 2008 8:38 am ] |
Post subject: | RE:Mouse beep test |
i'm so confused |
Author: | crysis [ Tue Apr 22, 2008 8:34 pm ] |
Post subject: | RE:Mouse beep test |
borring not fun pointless |
Author: | syntax_error [ Tue Apr 22, 2008 9:17 pm ] |
Post subject: | Re: RE:Mouse beep test |
crysis @ Tue Apr 22, 2008 8:34 pm wrote: borring not fun pointless
It's constructive criticism; not pointless unneeded comments. Also, this is not the first case, you have done this please read the forum rules. |
Author: | r.m_spy [ Wed Apr 23, 2008 9:51 am ] |
Post subject: | Re: Mouse beep test |
I'm sorry I'm so inconvinient but there are reasns for youre troubles. let me get the big one off my back first procedurs are needed to choose levels[/u] |