Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Linkset within Linkset and Link Messaging

Teddy Wishbringer
Snuggly Bear Cub
Join date: 28 Nov 2004
Posts: 208
03-05-2006 15:40
I'm working on a project right now for a scripted crib, and something is stumping me, namely with linking with possible issues in interlink messaging.

Ok - here's what I got.. I have two linksets.. one is the crib, and one is the crib side gate. The gate linkset consists of 3 prims, gate top, gate bottom and texture prim for the bars. The other linkset consists of all the other pieces of the crib.

The crib gate linkset is scripted to open and close on a listen command at the moment, but it's going to be messaged by the 'pose mattress' *laughs* which I've finally made work after all the pose rotational issues had been sorted out.

Anyway, I went to link the two linksets together and now only the prim with the script on the gate (with the texture railings) moves up and down, and not (was was linked with it) the top and bottom railings.

Unless I'm missing something stupid obvious, it appears I can't have two independant linksets 'linked' together as one object. Is this the case?

Considering people are going to be moving this crib around, I can see issues with the gate not being selected at the same time as the crib, thus the two being inadvertantly separated.

Also, if the two linksets are left independant, will messaging still work? I was under the impression that messaging only worked between prims of a complete linkset. Another wrong assumption?

Thanks!!

Teddy.
Teddy Wishbringer
Snuggly Bear Cub
Join date: 28 Nov 2004
Posts: 208
03-05-2006 15:45
Just a stupid idea.. but if the above isn't possible, should I just throw the movement code into the top and bottom railings as well? It might look lame to have three individual prims moving out of sync, depending on lag, etc.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
03-05-2006 19:48
From: Teddy Wishbringer
Unless I'm missing something stupid obvious, it appears I can't have two independant linksets 'linked' together as one object. Is this the case?

Yup, linking isnt hirarchial - once you link together two small link sets, they become one big link set. llSetPos/llSetRot will no longer move a group of prims around, only the child prim that called it (unless its in the parent, in that case it will move the set).

From: Teddy Wishbringer
Considering people are going to be moving this crib around, I can see issues with the gate not being selected at the same time as the crib, thus the two being inadvertantly separated.

Here's a possible solution:
Make the gate and crib seperate link sets. However, have the crib tell the gate (via llSay) when it moves where it moves. The gate can then use this information to reposition itself. This way, the crib and gate will remain together, even while being seperate link sets.

Otherwise, youll have to deal with each prim of the gate moving out of sync with the rest.

Psst, I take commissions :D
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Teddy Wishbringer
Snuggly Bear Cub
Join date: 28 Nov 2004
Posts: 208
03-05-2006 20:28
From: Christopher Omega
Yup, linking isnt hirarchial - once you link together two small link sets, they become one big link set.

Egads.. yeah, that's kinda what I suspected..

From: someone
Here's a possible solution:
Make the gate and crib seperate link sets. However, have the crib tell the gate (via llSay) when it moves where it moves. The gate can then use this information to reposition itself.

I thought about that as an option.. kinda the way res-foo works.. unfortunately that seemed a little overkill for a product that I wouldn't be selling for very much. *laughs*

I finally got it all working, but I had to do some retexturing to get it down to one prim, so of course, it all works fine now.

The linking system needs some upgrades. :)

Thanks for the reply!
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
03-06-2006 05:41
come join the party at Prop 607: Heirarchical Linking :)
Exile Loudon
Aspiring Scripter
Join date: 10 Dec 2005
Posts: 122
03-06-2006 14:51
Why don't you set up your crib using hinges? They are a lot simpler, and you just put physics on the crib and you're done.
Till Stirling
Crazy Inventor
Join date: 31 Jul 2004
Posts: 124
03-06-2006 15:06
A suggestion would be to use the integer part of the linked message as a kind of channel-number. Then in the link_message event, just check if its the correct channel and then act accordingly. Works fine in several things I made.

Till Stirling
_____________________
Syphex Odets
Essellian
Join date: 13 Sep 2005
Posts: 16
03-06-2006 16:05
On that Google TechTalk Philip mentioned that they were working on implementing hierarchical linking now. I know that means it'll probably be ages away, but I didn't know if it had been officially mentioned anywhere as actually being on the agenda.
_____________________