-
How would I have the code pause when I want it to with a wait() function? I'm not sure how to make one. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
There is no wait function, but you can do something like this local t=0
function TIC()
cls(12)
t=t+1
-- wait 2 seconds
if t<2*60 then return end
print("HELLO WORLD!",84,64)
end |
Beta Was this translation helpful? Give feedback.
-
just to be helpful, since no one mentioned this yet, instead of "burning CPU" with some kind of wait function, if you need to delay some action, if possible it's better to use the modulo, for example instead of:
use:
|
Beta Was this translation helpful? Give feedback.
-
what about something like...
this is quick, but it has the disadvantage that can't resume the program flow where were left i learned this the hard way... in my ignorance, i did |
Beta Was this translation helpful? Give feedback.
-
@nesbox Can you add a function sleep() or wait()? |
Beta Was this translation helpful? Give feedback.
There is no wait function, but you can do something like this