View previous topic :: View next topic |
Author |
Message |
129K How do I cheat? Reputation: 0
Joined: 09 Apr 2013 Posts: 9
|
Posted: Wed May 22, 2013 3:50 pm Post subject: Is there a "sleep" function in CE Lua? |
|
|
For example:
Code: | sleep(1000) -- in miliseconds |
Thanks
_________________
~ 129K |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Wed May 22, 2013 3:57 pm Post subject: |
|
|
yes
Code: |
sleep(milliseconds)
|
will pause the thread executing that command for the specified number of milliseconds
Keep in mind that the main gui thread tends to be the one executing the code when you execute it from the gui, so it will cause a freeze for the specified amount of time.
If you don't want that freeze try a timer instead
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
129K How do I cheat? Reputation: 0
Joined: 09 Apr 2013 Posts: 9
|
Posted: Wed May 22, 2013 10:43 pm Post subject: |
|
|
Dark Byte wrote: | yes
Code: |
sleep(milliseconds)
|
will pause the thread executing that command for the specified number of milliseconds
Keep in mind that the main gui thread tends to be the one executing the code when you execute it from the gui, so it will cause a freeze for the specified amount of time.
If you don't want that freeze try a timer instead |
Thanks, but I tried Code: | sleep(1000) print("asdf") |
It didn't pause, and immediately printed "asdf" without waiting.
_________________
~ 129K |
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed May 22, 2013 11:12 pm Post subject: |
|
|
Code: | sleep(5000); print(1) |
Erm, it does wait.
1 seconds is bit too fast?
_________________
|
|
Back to top |
|
|
129K How do I cheat? Reputation: 0
Joined: 09 Apr 2013 Posts: 9
|
Posted: Thu May 23, 2013 1:56 pm Post subject: |
|
|
Flash hacker wrote: | Code: | sleep(5000); print(1) |
Erm, it does wait.
1 seconds is bit too fast? |
Oh, it does wait. I guess I was doing something wrong. Thanks
_________________
~ 129K |
|
Back to top |
|
|
|