Author Topic: An equivalent to "wait()"?  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
An equivalent to "wait()"?
« on: June 25, 2011, 09:31:51 pm »
I've tried "timer", but all it does is screw up my redrawing. The wiki's explanation is pretty vague if it makes any sense.

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: An equivalent to "wait()"?
« Reply #1 on: June 25, 2011, 11:26:04 pm »
You could use a for loop that increments >9000! times, but does nothing inside. I have no idea how long 9001 will actually take, you will have to experiment with different values.
I think timer is for measuring the amount of time, you could also set the timer to 0 and use a while loop that only exits after a certain time passes on the timer, though you will only get .01 second precision with this.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: An equivalent to "wait()"?
« Reply #2 on: June 26, 2011, 06:34:39 am »
I highly recommend you to check the Lua Routines topic, there may be something useful there ;)

Ashbad

  • Guest
Re: An equivalent to "wait()"?
« Reply #3 on: June 26, 2011, 09:11:28 am »
If you want, you can show me how your code looks right now and I can show you how to have that setupNoBreakPause routine would work.