Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:21 PM |
I have a script with this line in it:
if math.random(1, 1000) == 1 then wait() end
But it's too slow.. Does anybody know a safe number I can put instead of 1,000 to make it faster?
(before I get any questions, I'm iterating 10^9 times to create a massive table. For a game :P |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:29 PM |
| you only need 1 wait per loop unless you acually want to wait for something. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:30 PM |
Huh? if math.random(1,25) == 1 then wait() end
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:31 PM |
if math.random(1, 1000) == 1 then wait(0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001) end
|
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:32 PM |
game, the lowest you can wait is 1/30(or wait()).
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:32 PM |
| LolUmad? I cooked yur brainham. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:33 PM |
| Cease, it was a joke lol. I've known that since I started scripting. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:33 PM |
I really wish you were smarter...
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:33 PM |
By the, way I was responding to the LolUmad post.
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:34 PM |
| Ceasless, I wish you were smart enough to read the comment after that and stop insulting with no valid or legitimate reason... |
|
|
| Report Abuse |
|
|
| |
|
Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:35 PM |
@shipmaster4000 I don't want one wait per loop. If it was just a standard wait() then the script would take to long. I want it to wait every once in awhile in a loop. In my example above, it waits close to every 1,000th iteration.
@Cease That would make my script slower..
@game That was the worst joke.. It had nothing to do with the question..
w/<3 |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2012 07:35 PM |
game, it's called a late post, ever heard of it, or are you just that moronic?
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:36 PM |
I hate how scripting helpers is just filled with idiots who think they can script.
w/<3 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:36 PM |
| hey Laek. Like dis sacue boi? yeyeyeye it so soft and yummeh. Mmmhmm hmhmhmhhmhmhmhmhmh . Spampsamspamspsams |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:36 PM |
I maybe an idiot, but I can script, lol.
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:38 PM |
| And ceaseless and laekem, I think you guys need to get out before you guys get straight up embarrassed. I means seriously, calling someone hwo has a point moronic. That's pretty sad you resort to insults. Laekem, I doubt you cans cript either. No one asked for your guys' opinions. Idiots. |
|
|
| Report Abuse |
|
|
Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:38 PM |
> I maybe an idiot, but I can script, lol.
lol. Not really, considering you did the complete opposite of what I asked.
w/<3 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:38 PM |
Since no one is helping you, I will:
while true do for i=1,1000 --code end wait() end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:39 PM |
while true do for i=1,1000 do --code end wait() end
oops, i forgot a do |
|
|
| Report Abuse |
|
|
Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:39 PM |
lol
I can script brah. It looks like you are the one that can't, considering you can't answer my question so you just try and make a joke to look funny.
w/<3 |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 27 Dec 2012 07:40 PM |
@Laek;
You're going to have to fiddle with the numbers until it works as quickly as you want it to.
tick = 0; for whatever do --Whatever loop line you're using. tick = tick + 1; whatever.block; if (tick > 500) then --Mess with the 500 tick = 0; wait(); -- Wait 1/30th of a second, the minimum. end end
This will barely slow the code execution at all but will remove any possible loop lag. |
|
|
| Report Abuse |
|
|
Laekim
|
  |
| Joined: 04 Oct 2012 |
| Total Posts: 118 |
|
|
| 27 Dec 2012 07:41 PM |
> while true do for i=1,1000 do --code end wait() end oops, i forgot a do
What is this.. I don't even.. That would make my script crash, considering instead of 1,000 iterations, mine is doing 1,000,000,000 iterations..
w/<3 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2012 07:41 PM |
game, at least I can spell. Lae, it would make it faster since it would have less possibilities.
Private Chat Gui: http://www.roblox.com/Private-Chat-GUI-item?id=101293225 |
|
|
| Report Abuse |
|
|