booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 18 Sep 2011 06:28 PM |
| What is the equivalent of wait? |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 18 Sep 2011 06:30 PM |
| depends how you're doing it. Either nothing there at all, or coroutine.yield() |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 18 Sep 2011 06:31 PM |
| os.execute("sleep " .. tonumber(n)) |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 06:31 PM |
Use a loop to hang your thread?
It won't cause your shell/entire computer to freeze like it does in Roblox. |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
| |
|
|
| 18 Sep 2011 06:34 PM |
| ehh commands aren't a very portable way to handle things |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 18 Sep 2011 06:37 PM |
| I know, but it works (on some systems) |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 06:40 PM |
function wait(Time) local Begin = os.time() repeat until Begin <= os.time() + Time end
|
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 18 Sep 2011 06:50 PM |
"repeat until Begin <= os.time() + Time" repeat until Begin+Time<=os.time() |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 18 Sep 2011 08:05 PM |
| It'll be repeating quite a bit. On roblox, if Os wasn't locked, it would crash the game. |
|
|
| Report Abuse |
|
|
thegenius
|
  |
| Joined: 03 Oct 2008 |
| Total Posts: 3838 |
|
|
| 18 Sep 2011 08:11 PM |
hax Lua into C++ and include dos.h and use _sleep()
I have no experience with legitimate Lua...
(Note: Math FTW) (Also, thegenius is insane.) |
|
|
| Report Abuse |
|
|