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.

DarkBASIC Professional Discussion / How do we pause a game in DBPro?

Author
Message
Gamer
23
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 17th May 2003 09:48
If during game play a player presses a key for help (lets say F1), how do we make the game pause? We can't use the SLEEP or WAIT command since both require a time parameter. Anybody?
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 17th May 2003 10:51
SUSPEND FOR KEY
This command will pause the program from running until a key is pressed. To
detect for a specific key, please refer to the INKEY$ or SCANCODE commands
found in the Input Command Set.

SYNTAX
SUSPEND FOR KEY
Kangaroo2
23
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 17th May 2003 10:57 Edited at: 17th May 2003 10:59
Suspend for key will do it, but won't stop the timer



Fiddle about with something like that

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 17th May 2003 11:28
Or you can use DO and LOOP this way you can have some animation playing while it is paused.. then when you press f1 again it exits the pause loop. Use inconjuction with Kangaroo2 method for holding the timer..
Gamer
23
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 17th May 2003 21:35
how do I get to the code snippet...I clicked on it but nothing happened...

David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 17th May 2003 21:44
The snippet tags only work in IE I think.

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
Gamer
23
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 17th May 2003 22:02
thanks all. I'll give it a try.

Kangaroo2
23
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 18th May 2003 01:29
Sorry - click on the source button below this post instead

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me

Login to post a reply

Server time is: 2026-07-11 22:25:05
Your offset time is: 2026-07-11 22:25:05