Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / running into problem

Author
Message
gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 2nd Aug 2004 04:52
how do i make it to where you use the arrow keys to move the selector thing and enter to select, like making it end when you click exit game.

Rem Project: Midtime
Rem Created: 7/21/2004 10:42:00 AM

Rem ***** Main Source File *****
sync on
sync rate 0

`-------------------- Select screen -------------------------------
StartPrompt:
cls
clear entry buffer
load image "Midtime title.jpg", 1
paste image 1, 155,120
center text 200, 400, "[N]ew Game"
center text 330, 400, "[L]oad Game"
center text 450, 400, "[E]xit Game"
sync

Select upper$(INKEY$())
Case "N": gosub NewGameInit : EndCase
Case "L": gosub LoadGameInit: EndCase
Case "E": Gosub Quit: Endcase : if input "e" then end
Case default: Goto StartPrompt :Endcase
EndSelect
gosub main
wait key

`------------------------------------------------------------------
`Game typr initialization

NewGameInit:
`new game initialization code
test$="newgame was processed"
gosub main
return

LoadGameInit:
`Load game initialization
test$="load game was processed"
return

quit:
`cleanup resources
test$="quit was processed - press any key"
print test$
sync
wait key
end
return

`****************** Main Game Loop
main:
do
`cls
text 10,20,">"+test$
if mouseclick()=1
goto StartPrompt
endif
sync
loop
return

Chaos Games
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Aug 2004 09:39 Edited at: 2nd Aug 2004 09:40
Really depends on what type of selector you wan to use. Sprite? 3d object? Text? Hope this helps a little. There are many ways to do this.


gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 3rd Aug 2004 03:07
thanks lost in thought

Chaos Games
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd Aug 2004 03:56
Glad I could help. There are better ways to do it i'm sure. Like I sadi it really depends on how you want to do it. 1000 ways to skin a cat

Login to post a reply

Server time is: 2024-09-22 19:29:08
Your offset time is: 2024-09-22 19:29:08