|
| 30 Apr 2013 03:23 PM |
So, I'm trying to make a circle that rotates underneath of your character My only problem is that a while loop that constantly updates the CFrame is laggy
meaning that if you walk or jump there is a slight delay
any ideas(besides decreasing wait time in the while loop)?
|MassiveGman| Scripter & part time Professional Whistler |
|
|
| Report Abuse |
|
|
getkoed2
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 1144 |
|
|
| 30 Apr 2013 03:26 PM |
| Just freeze that character and he won't be able to move :d |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 03:27 PM |
it's an effect for a staff I'm working on, so that would not be very efficient
|MassiveGman| Scripter & part time Professional Whistler |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Apr 2013 03:28 PM |
Ah. That might work. Then just update the weld to rotate it?
I'll try it, Thanks.
|MassiveGman| Scripter & part time Professional Whistler |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 03:32 PM |
Yes. weld.C1 = desiredspherecframe:inverse()*partweldedto.CFrame |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 03:55 PM |
"weld.C1 = desiredspherecframe:inverse()*partweldedto.CFrame"
We use DesiredCFrame:toObjectSpace(BaseCFrame) nowadays. The previous was used in 2007 scripts that have been dug up and retaught.
Also, just welding won't guarantee smooth movement. Things like BodyPosition and BodyGyro are better since they interpolate (smoothly move, or tween) the part. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:08 PM |
| BodyPosition and BodyGyro require constant updating, or it'll be behind on schedule. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:16 PM |
"BodyPosition and BodyGyro require constant updating, or it'll be behind on schedule."
A weld does as well. I don't see your point. It's as if it was never there. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:17 PM |
| He said, if you jump or walk, the block won't be under the character anymore until you update it. He wanted that fixed, without having to make a loop that checks every so-many-times-per-second. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:20 PM |
No, he did not say that. He said there is a slight delay - which anyone who's used something similar to the effect of his feature would notice.
You, I am sure, understand that a revolving object requires some scripting (unless you abuse the Glue object, to which is unreliable). The scripting updates the coordinate frame of the part every frame. Now, it is slightly laggy because you have to have a wait() in the loop, else the game will freeze.
This is what he means, the part seems to "jump" or "lag behind" the player because of this delay. It wouldn't appear to do so with Body objects because it would interpolate and smoothly tween to the position. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:23 PM |
"meaning that if you walk or jump there is a slight delay
any ideas(besides decreasing wait time in the while loop)?"
He wants a high waiting time. I don't know what he wants it to rotate like, but if he wants only a couple of steps per circle (which I assumed), he should use welds because otherwise he'll still have the delay when you move. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:25 PM |
If you use a bodyposition, and you move, the position will have to be re-set, and you'll have to wait for the bodyposition to have tweened the position of the block to the desired position. This is the delay he doesn't want. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:26 PM |
"He wants a high waiting time."
If that minuscule and vague piece of information that you gained from barely a hint of implication is what you came to a conclusion on, then good luck. Because that's nowhere near the reason why he posted " .... (besides decreasing wait time in the while loop)" |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 30 Apr 2013 04:27 PM |
Welds.
It's how I fixed the same problem in BTDF, where small objects aren't updated at the EXACT moment the character updates. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:27 PM |
| He wants a high waiting time. High as in long enough not to notice any lag. This is too long to update fast enough to not notice the delay visually. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:28 PM |
"High as in long enough not to notice any lag. This is too long to update fast enough to not notice the delay visually."
...
You don't increase wait time to stop "jumpiness".
Really....that's just dumb. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:30 PM |
Oh woops, sorry.
"If you use a bodyposition, and you move, the position will have to be re-set, and you'll have to wait for the bodyposition to have tweened the position of the block to the desired position. This is the delay he doesn't want."
By that post there, I can finally say (and I've been holding this back) that you have no idea what you are talking about. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:31 PM |
You misread or misinterpreted my words. I said; he 1) wants no lag (thus not make a loop that repeats a lot of times in a short period of time, which is what you want to do) and 2) wants the block to instantly move with the character (which, with tweening after waiting, is not possible to do). |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 30 Apr 2013 04:31 PM |
Increasing wait time would increase the jumpiness. Decreasing it to the minimum (0.03 recurring) seconds would still have a visible jumpiness.
Welds stop this problem, as ROBLOX handles welds serverside which replicate to the client, whereas straight up Part updates replicate to the server if in a localscript, which most of the time if it's in the tool, it will. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2013 04:32 PM |
| Seeing as you're now calling me dumb, and telling me that I have no idea what I'm talking about, I'll take that you're out of arguments to defend your ridiculous statement and thus will I be heading off to do something else. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:32 PM |
"wants the block to instantly move with the character (which, with tweening after waiting, is not possible to do)."
Even more incorrect information. You probably don't know the mechanics of tweening then. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 30 Apr 2013 04:33 PM |
"Seeing as you're now calling me dumb"
To be honest, I was doing that in my head when I saw your first post. But that's just honesty. |
|
|
| Report Abuse |
|
|
Incohatus
|
  |
| Joined: 03 Aug 2012 |
| Total Posts: 2612 |
|
|
| 30 Apr 2013 04:39 PM |
MasterOfDeathOnes Scripting > MrNicNac's Scripting.
get out nick |
|
|
| Report Abuse |
|
|
Iciness
|
  |
| Joined: 18 Jan 2012 |
| Total Posts: 20969 |
|
| |
|