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 » Scripting Helpers
Home Search
 

Re: Position problems. - Adv. topic, I know d(@_@)!

Previous Thread :: Next Thread 
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 08:39 AM
Hello.

First, you must know about CFraming, Vector3s, a functions and such. Variables, coroutines, methods, local parts, tables and such should not be the problem here.

---------------------------------------

My problem is that I want to make a path generation -thing.
It seems to work.
But when you come to a corner (Corner or Triple), then something is going wrong and the "chunk" (path part) seems to be misplaced somewhere, which have made me fight to find out how this problem could be solved.

Below is the function you need to know about, insertChunk simply create a chunk from an ID and place it on the given position. mapparts is a table containing {"chunkname", possibility}. So don't worry about it.

And to say it out clear if you haven't read the text above, it is not that my script throw an error, since syntax won't get me down. Ever. But it's just giving some unwanted results.


Also, insertChunk will return the model containing the path piece. You can create some 100x100 base-plates with some parts on them to watch this in-game.

---------------------------------------

ROBLOX blocked the code, I will reply it when I can.

---------------------------------------



- As, TL;DR your hat!
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 08:44 AM
local camera = waitForProperty(workspace, "CurrentCamera")
local dir = Vector3.new(0, 0, -100)

local currDist = Vector3.new(-100, 8, -300)
local lastChunk = 1
local rotateChunk = 0

coroutine.wrap(function()
wait()
while wait(0.1) do
if ((currDist + dir) - camera.CoordinateFrame.p).Magnitude < 200 then
--This line will come in the next reply.
if chunkID then
if tostring(chunkID):find("PathC") then print("Corner1:",rotateChunk)

rotateChunk = (math.random(0, 1) == 1 and tostring(chunkID) == "PathCTriple" and rotateChunk - 90) or rotateChunk - 90
print("Corner2:",rotateChunk)
dir = CFrame.Angles(0, math.rad(rotateChunk - 90), 0).lookVector * 100
end
currDist = currDist + dir
end



end
end
end)()


- As, post ID = 8.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 08:47 AM
local chunkID = insertChunk(currDist + CFrame.Angles(0, math.rad(rotateChunk - 90), 0).lookVector * 100, 100, lastChunk, rotateChunk)


- As, why are you banning dis line?
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 09:37 AM
---------------------------------------
It is so silent.



This... is the right forum to post my stuff at, right?

- As, don't you dare use the B word?
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
04 Mar 2013 09:39 AM
Right forum, to advanced.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 09:59 AM
Yush.


Did you all have a good day?

What did you eat to breakfast?

What is your favorite online building game?

Can you answer my awesome problem above? ^



- As, awesome problems to awesome persons!
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
04 Mar 2013 10:17 AM
Did you all have a good day?
Yes.

What did you eat to breakfast?
Eggs with bacon.

What is your favorite online building game?
I have none.

Can you answer my awesome problem above? ^
Nop.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 10:21 AM
...

What about Roblox? Well, ok.


What will be of Guy Dangerous and the idol?

When will my thread make some progress?

Will this continue in a 2nd edition?



- As, director of the movie "Position problems. - Adv. topic, I know d(@_@)!"
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
04 Mar 2013 10:24 AM
What will be of Guy Dangerous and the idol?
IDK

When will my thread make some progress?
IDK

Will this continue in a 2nd edition?
IDK
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 10:51 AM
*sigh*


Is there someone who is willing to help with the problem? I'm looking at it time after time and is getting tired now D:


- As, _G.Decode(_G.Decode(_G.Encode("A8/D0/D2/E6/40/D2/E6/40/DA/F2/40/F4/D2/CE/CE/F2/42"))) // koen500's encoding/decoding!
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
04 Mar 2013 10:52 AM
Give me a minute to read your post. :P
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
04 Mar 2013 10:57 AM
Erm... I don't get it ._.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 11:03 AM
...

It should place a model (100x100) and rotate it to fit making completely random paths.



I may upload a video later.

Dinner.


- As, gone... rgrg
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 11:43 AM
Uploaded video, no coding, bad resolution, forgot to set it to HD and so on.
http://youtu.be/Krcad0b6Z5c


From what I can see, there seems to be an offset of (200, 0, 100) or (100, 0, 200)... maybe negative... from when you reach a corner.




- As, tix me pl+x.
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
04 Mar 2013 11:59 AM
I can't even tell what's going on the quality is so bad ;O

~print("pew")~
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 12:14 PM
http://youtu.be/6KUyBJmJcPo
Better qualityyyy!

But the FPS isn't 100%...


- As, TREES ARE IN MY WAY! RUN!
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
04 Mar 2013 12:22 PM
This video is currently being processed.

~print("pew")~
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 12:26 PM
Still on 19%. Way slower than the first one.



- As, print(dmjoe + 1)
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
04 Mar 2013 12:31 PM
Mk. But I probably can't help you.

~print("pew")~
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 12:34 PM
urgh, I just lost 55 HP there.

Well, I'll post when the video is ready, then I hope stuff will begin to progress...



- As, 45 HP left! We can still survive!
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 01:41 PM
>>> 100% done <<<


- As, I'll go make a new path system if this problem is too big. But not before in 3 hours.
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
04 Mar 2013 01:48 PM
'local chunkID = insertChunk(currDist + CFrame.Angles(0, math.rad(rotateChunk - 90), 0).lookVector * 100, 100, lastChunk, rotateChunk)'

Isn't currDist a Vector3 and so is lookvector?

Yet CFrame.Angles is not.


From what I know, you can';t add Vector3's and CFrames. I don't know if this is the problem though.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 01:52 PM
@OP, my script isn't erroring. I made the CFrame.Angles part to replace a not so good function I had before. Hm.



- As, what do we do when we do your homework? Nothing!
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
04 Mar 2013 01:57 PM
What do you mean as 'not so good'?

If it worked, stick with it for now, because I think the glitch is adding the Vector3's with the CFrames, it doesn't give you the answer that you are looking for.
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
04 Mar 2013 02:01 PM
It was worse than the other one. So no, it didn't quite work.
^ I wasn't clear enough there. :/


Well, I'll go do some more tests.

- As, you can find me in the laboratory.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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