HI ALL!
remeber my game?
Well I updated it by adding a escape code.
Before u press escape and then it just quits program and gives control back to windows.
Now ia dded it so it asks "ARE U SURE U WANT TO QUIT"
Pretty neat, I read it in my book but edited it for my game so I impressed my self.
What i need help with is basicly if u look at my game or play it once u hit bottom screen it carries on from there.
Know what I mean?
I mean it just goes on and on.. How do I code it so once it hits bottom of the screen it starts from top again so its nice and fresh?
Heres my code
THanks
WAZ!
any help greatful
EDIT:
Notice i starting to use OR :)
i am now currently reading until repeat forever commands
remeber my game?
Well I updated it by adding a escape code.
Before u press escape and then it just quits program and gives control back to windows.
Now ia dded it so it asks "ARE U SURE U WANT TO QUIT"
Pretty neat, I read it in my book but edited it for my game so I impressed my self.
What i need help with is basicly if u look at my game or play it once u hit bottom screen it carries on from there.
Know what I mean?
I mean it just goes on and on.. How do I code it so once it hits bottom of the screen it starts from top again so its nice and fresh?
Heres my code
; select example AppTitle "Dice Roll" Graphics 800,600 .start SeedRnd(MilliSecs()) ; Sets the random generator to get real random numbers when program is ran computer% = Rand(1,6) Select computer% Case 1 Print "The computer rolled a 1" Case 2 Print "The computer rolled a 2" Case 3 Print "The computer rolled a 3" Case 4 Print "The computer rolled a 4" Case 5 Print "The computer rolled a 5" Case 6 Print "The computer rolled a 6" End Select Print "Please press space to roll the dice!" ;Set a varible for gameinprocess true GameInProcess = True While GameInProcess = True While KeyHit(57) player = Rand(1,6) Print "You rolled a "+player+" If player < computer% Then Print "Computer WINS!" Else If player > computer% Then Print "You WON!" Else If player = computer% Then Print "ITS A DRAW!" EndIf EndIf EndIf Goto start Wend If KeyHit(1) ;Clear screen Cls QuitAnswer$ = Input$("Really quit (Y/N)?") If QuitAnswer$ = "Y" Or QuitAnswer = "y" Then GameInProcess = False Else Goto start EndIf EndIf Wend
THanks
WAZ!
any help greatful
EDIT:
Notice i starting to use OR :)
i am now currently reading until repeat forever commands