delay example?
Blitz3D Forums/Blitz3D Beginners Area/delay example?
| ||
can sdoemone gove me an example of the best/easiest way to do a delay. for example an animated character does something , pauses then does something else. |
| ||
Here you go:;outside of main loop delayTime=1500 ; 1 1/2 secs time_to_wait=millisecs()+delayTime ; use 0 for no initial delay ;in main loop if millisecs()>=time_to_wait doThings() time_to_wait=millisecs()+delayTime end if Have fun. |
| ||
hmm delayed answer( just kidding) |
| ||
here u go delay 1 |
| ||
Using 'delay 1' would delay the entire program though, Agamer. The timeout method that Darknature described is the best way to do controlled delays. |
| ||
I know I was been sarcastic sorrt to stear you wrong but it can have its uses |
| ||
Yeah I know about delay Agamer, I tried that a while ago . I delayed my program while I went for a 'tom tit' Thanks Dark nature. I will try that out, cheers man |