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 / How to make something happen every 10 seconds?

Author
Message
Bigdog
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 6th May 2003 22:13
Is it possible to make something in your program happen every 10 seconds? Like the bombs in psace invaders drop every few seconds and the flying saucer comes every certain amount of second. Thanks
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 6th May 2003 22:27
something like this:

mytimer#=timer()+10000

do
...
code
...
if timer()>mytimer()
..do stuff..
mytimer#=timer()+10000
endif
...
code
...

sync

loop
Bigdog
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 6th May 2003 22:38 Edited at: 6th May 2003 22:42
Thanks for the quick reply. Now I can get on with my program Is the bit where you wrote if timer()>mytimer() sopposed to be if timer()>mytimer# ??

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th May 2003 23:53
yes it is

Login to post a reply

Server time is: 2024-09-20 08:04:33
Your offset time is: 2024-09-20 08:04:33