Parthax
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 6941 |
|
|
| 29 Mar 2013 09:00 PM |
How would we be able to tell? First off, if it's not in workspace, where would the script be holding the child script? If you wanted to print the parent, wouldn't it crash due to the parent script not being able to print it's parent, due to it being itself?
❖ VOID Successor Parthax ❖ |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 09:03 PM |
Circular parent references aren't allowed. That's not a crash, either. It's easily resolvable.
Trees simply do not have cycles in them. Graphs can easily, and then that's just like a singleton, but a lot harder to detect as that. |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 29 Mar 2013 10:45 PM |
| Actually, if you were to visualise ROBLOX's hierarchy literally, (strong emphasis on literally,) all of the objects would be all crammed into the same level with links to their 'parent'. And it would look like a big giant spider web with all the links going from one to the other. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 10:46 PM |
You cannot parent something to itself
It errors the script
Ok
Modifying the .rblx file cannot make it happen either |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2013 10:48 PM |
"Actually, if you were to visualise ROBLOX's hierarchy literally, (strong emphasis on literally,) all of the objects would be all crammed into the same level with links to their 'parent'. And it would look like a big giant spider web with all the links going from one to the other."
Isn't that how everyone thinks about it? Have I been doing it wrong? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 30 Mar 2013 06:36 AM |
| I think of it more like a tree, having Game/DataModel as the root, and then multiple 'sprouts' from the root indicating things like Workspace, Terrain etc. |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 30 Mar 2013 08:03 AM |
| ^ That is what it emulates, but iirc the truth is they all are stuffed into memory and their "Parent" property is just a link. |
|
|
| Report Abuse |
|
|
|
| 30 Mar 2013 09:47 AM |
@coplox
Explain, then, how the GetChildren function works. Are you implying it looks through all the objects in the game and returns those that have the object as a parent? |
|
|
| Report Abuse |
|
|
coplox
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 3252 |
|
|
| 30 Mar 2013 09:54 AM |
| Yes. Keep in mind it's c-side. |
|
|
| Report Abuse |
|
|
lah30303
|
  |
| Joined: 15 Feb 2008 |
| Total Posts: 10027 |
|
|
| 30 Mar 2013 10:04 AM |
| Why do they do it that way? |
|
|
| Report Abuse |
|
|
TeamDman
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 897 |
|
|
| 30 Mar 2013 10:37 AM |
parent to itself... keep clicking the plus button :D |
|
|
| Report Abuse |
|
|