Wait() : How do I pause execution for x seconds ?

BlitzMax Forums/BlitzMax Beginners Area/Wait() : How do I pause execution for x seconds ?

DannyD(Posted 2005) [#1]
I'm wondering how I would go around pausing my code for x seconds.I used a counter until x = y but it's not a measure of time.

I'm looking for something like this...
do routine
wait (5 seconds)
do another routine
wait (2 seconds)

Thanks in advance.


Stuart Morgan(Posted 2005) [#2]
This is what you want...
Delay 1000    ' delay program execution for 1 second



DannyD(Posted 2005) [#3]
oh, cool . Thanks mate.


DannyD(Posted 2005) [#4]
Graphics 800,600,0 'set gfx mode
DrawText "asd",30,100
Delay 2000
DrawText "Vasd",100,230
Delay 2000

this doesn't appear to work for me :(


Stuart Morgan(Posted 2005) [#5]
You need to Flip the backbuffer to draw anything to the screen...

Graphics 800,600,0
DrawText "asd",30,100
Flip
Delay 2000
DrawText "Vasd",100,230
Flip
Delay 2000



DannyD(Posted 2005) [#6]
doh, thanks again Stuart