generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
12 Jan 2013 06:21 PM
[ Content Deleted ]
Report Abuse
DannyCore is not online. DannyCore
Joined: 25 Apr 2012
Total Posts: 990
12 Jan 2013 06:23 PM
roblox at it again
Report Abuse
Garnished is not online. Garnished
Joined: 09 Apr 2012
Total Posts: 12695
12 Jan 2013 06:58 PM
^
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
12 Jan 2013 07:11 PM
Try wait() vs wait(0)...for...secret reasons...

Btw...velkommen back.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
12 Jan 2013 08:11 PM
[ Content Deleted ]
Report Abuse
NINJAKID09 is not online. NINJAKID09
Joined: 27 Aug 2009
Total Posts: 14392
12 Jan 2013 08:17 PM
Probably more of their "mobile optimization".
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
13 Jan 2013 03:45 AM
yay oysi back
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
13 Jan 2013 10:58 AM
How can you wait less than a frame?

The max number of frames is 30 and as far as I know you can't wait more than 1/30 since, ROBLOX limits the number of frames to 30 FPS.

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
13 Jan 2013 11:00 AM
@Candy,

Workspace.Changed occurs more than once a frame.
Report Abuse
Tenal is not online. Tenal
Joined: 15 May 2011
Total Posts: 18684
13 Jan 2013 11:06 AM
SN0X is cool
Report Abuse
kirkyturky12 is not online. kirkyturky12
Joined: 30 Apr 2010
Total Posts: 1915
13 Jan 2013 11:51 AM
Lolwut?

print(wait(0)) --> 0.040481849987557

print(wait(0.00001)) --> 0.01686953110881

print(wait(0.0000001)) --> 1.6208624344927e-006
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
13 Jan 2013 12:25 PM
Use RunService.Stepped for better/perfect timing.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
13 Jan 2013 12:42 PM
@caiks:

I found something, possibly, interesting, with this script:
game:GetService("RunService").Stepped:connect(function(t, s)
print(t, s)
end)

I got this (cut down) output:

4.0666668787599 0.033333335071802
4.1000002138317 0.033333335071802
4.1333335489035 0.033333335071802
4.1666668839753 0.033333335071802
4.2000002190471 0.033333335071802
4.2333335541189 0.033333335071802
4.2666668891907 0.033333335071802

Now note how the 'step' (s variable) is always the same unlike print(wait()) ...

cOLD?
Report Abuse
DannyCore is not online. DannyCore
Joined: 25 Apr 2012
Total Posts: 990
13 Jan 2013 12:44 PM
so cOLD roblox
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
13 Jan 2013 01:45 PM
@TheMyrco
Like I said, it has better timing.

Here's an example with wait:
local camera = workspace.CurrentCamera
local part = game.Players.LocalPlayer.Character.PrimaryPart
camera.CameraType = "Scriptable"
while true do
   camera.CoordinateFrame = CFrame.new(part.Position + Vector3.new(10, 10, 10), part.Position)
   camera.Focus = CFrame.new(part.Position)
   wait()
end
This one will often lag.

Here's an example with stepped:
local camera = workspace.CurrentCamera
local part = game.Players.LocalPlayer.Character.PrimaryPart
local runService = game:GetService("RunService")
camera.CameraType = "Scriptable"
while true do
   camera.CoordinateFrame = CFrame.new(part.Position + Vector3.new(10, 10, 10), part.Position)
   camera.Focus = CFrame.new(part.Position)
   runService.Stepped:wait()
end
This one will move smoothly.

This might be the reason ROBLOX used Stepped instead of wait in the loop of their rocket script.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
13 Jan 2013 01:53 PM
@Licaiks: Why not just use
runService.Stepped:connect(func)?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
13 Jan 2013 02:07 PM
[ Content Deleted ]
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
13 Jan 2013 02:09 PM
I do that normally, but in this case I replaced wait by RunService.Stepped:wait to demonstrate the difference.
I would rewrite it like this:
local camera = workspace.CurrentCamera
local part = game.Players.LocalPlayer.Character.PrimaryPart
local runService = game:GetService("RunService")
camera.CameraType = "Scriptable"
runService.Stepped:connect(function()
   camera.CoordinateFrame = CFrame.new(part.Position + Vector3.new(10, 10, 10), part.Position)
   camera.Focus = CFrame.new(part.Position)
end)
Report Abuse
kirkyturky12 is not online. kirkyturky12
Joined: 30 Apr 2010
Total Posts: 1915
13 Jan 2013 02:10 PM
@Oysi

I dunno. But it seems that the more zeros you put in there, the quicker it gets. :3 That's why I use

wait(0.000000001)

when I need my animations to run really fast. :3 Oh, and can I have your method of using regular ROBLOX GUI's as a form of billboard GUI's? (Somebody told me you made this.)
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
13 Jan 2013 02:11 PM
@Oysi
I'm not sure if I understand what you're doing, but...
Try setting the weld's C0 and C1 and the parts' CFrames accordingly so that the following is true:
Part0.CFrame * C0 = Part1.CFrame * C1
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jan 2013 03:21 PM
1) Open Studio.
2) Tools/Settings
3) Say okay to noob warning message.
4) Go to 'Lua' tab.
5) Set DefaultWaitTime to what you want.

Or am I wrong?
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
13 Jan 2013 03:22 PM
i'm guessing that would only affect the client, and thus localscripts. server-side scripts would run on normal DefaultWaitTime.

^ that information is highly theoretical, don't quote me on that. lol
Report Abuse
kirkyturky12 is not online. kirkyturky12
Joined: 30 Apr 2010
Total Posts: 1915
13 Jan 2013 03:22 PM
@Destroyer
Yes, that works for you, but for the other people playing his game, it will look laggy and run slower than what his would.
Report Abuse
thek00lkid is not online. thek00lkid
Joined: 18 Jun 2011
Total Posts: 2778
13 Jan 2013 03:38 PM
print(wait(-math.huge))
0.037953795379536 43.555126758593

print(wait(math.huge))
0.037999348146315 31.010476257385

0_o

I can't get the wait() lower than ~0.03



Report Abuse
kirkyturky12 is not online. kirkyturky12
Joined: 30 Apr 2010
Total Posts: 1915
13 Jan 2013 04:01 PM
@thek00lkid

print(wait(0.00001)) --> 0.01686953110881
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image