cant find command
BlitzPlus Forums/BlitzPlus Programming/cant find command
| ||
I cant seem to find a way to pause or make the program wait for a specified amount of time |
| ||
Delay will make the program wait for the given number of milliseconds. Note that Delay is absolute - there is no action you can take while a program is Delay-ed that will make it resume, or do anything at all until the time is up, so it's generally only useful for pausing in very simple programs indeed. A more advanced pause function like you might see in a graphical video game is something you need to code up by hand, to suit your project. |
| ||
if you want to stop program execution DELAY is ok, but if you want, that the user has to wait for some time, you would use a millisecs() timerGraphics 800,600 Repeat Cls ; press the mouse to get a rest If MouseHit(1) PauseTime=MilliSecs()+2000 EndIf ; change a value If PauseTime<MilliSecs() Circle=Circle +2 EndIf ; paint something X=Sin(Circle)*200 Y=Cos(Circle)*200 Oval X+400,Y+300,30,30 Text 30,30,MilliSecs() Flip 1 Until KeyHit(1) |