Please help with rezzed linked set question
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-04-2009 10:32
What I am trying to do and am having huge problems with, I am guessing mostly because I am new to scripting, is I want a prim to rez a linkset that will remain linked to the root so that it will move with the root prim. On command either touch_start of llListen, I want the rezzed linkset object to delete itself without deleting the root prim.
I don't think llBreakAllLinks will work because other prims are linked to the root prim that I do not want to delete. I would also like to do this with minimal scripts because of the lag issue created by multiple scripts running since the root prim is part of a vehicle.
Any and all advice, tips, tricks, or examples are greatly appreciated.
Mr B
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
06-04-2009 11:00
Not that I have tried this ....... but you could give each prim in the linkset you want to rez the same name. Then you write the script for your main object -- the one that the rezzed linkset links with -- to recognize those specific prims using llGetLinkName and llBreakLink them when you touch the object. I don't think there's a way to delete them, though, unless you also put a simple script in each prim to llDie when a changed event detects that the prim is no longer linked. I know that means that you end up with more scripts than you might like, but I can't think of a way around it.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
06-04-2009 11:30
From: Mr Bellingshausen What I am trying to do and am having huge problems with, I am guessing mostly because I am new to scripting, is I want a prim to rez a linkset that will remain linked to the root so that it will move with the root prim. On command either touch_start of llListen, I want the rezzed linkset object to delete itself without deleting the root prim. Are you mixing the concepts here or is it just me? To me it sounds as you consider the prim from which your linkset is rezzed, the root prim. It is not. The rezzed linkset has one root prim in it 
_____________________
From Studio Dora
|
|
Mr Bellingshausen
Registered User
Join date: 25 Mar 2009
Posts: 14
|
06-04-2009 12:36
I may be mixing the concepts. What I need to happen is that the linkset object that is rezzed from the prim remains linked to the prim it came from. And I want it to move with that prim until it is told to delete itself leaving the source prim in place along with anyother prims associated with the prim that rezzed the second linkset.
I hope that is a little more clear.
|
|
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
|
06-04-2009 13:28
OK, this is not quite what you asked for, but how about this: You have a prim that is loaded with a SET of linksets (yes, it can be only one). There is a menu for the prim which has a few commands, among which are 'rez linkset' Once rezzed, you can move the entire set of linksets at once just by moving the original prim. However, that prim is not actually linked to any of the linksets. Once you are done moving the linksets around, you choose another menu item to release the linksets from the original prim. You can then either leave the original prim around, or delete it. ----- If that's what you want, either get the Builder's Buddy open source scripts ( http://wiki.secondlife.com/wiki/Builders_Buddy), or buy Rez-Foo or Rez-Faux. If that's not what you want, sorry! .
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
06-04-2009 13:52
From: Mr Bellingshausen I may be mixing the concepts. What I need to happen is that the linkset object that is rezzed from the prim remains linked to the prim it came from. And I want it to move with that prim until it is told to delete itself leaving the source prim in place along with anyother prims associated with the prim that rezzed the second linkset.
I hope that is a little more clear. I have an idea what you want. You want a prim grow some more prims at a given command and get rid of them on another? The way it is often done is by setting no transparency: llSetAlpha(1.0, ALL_SIDES); and full transparency: llSetAlpha(0.0, ALL_SIDES); See: http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSetAlpha
_____________________
From Studio Dora
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
06-04-2009 16:00
From: Mr Bellingshausen I may be mixing the concepts. What I need to happen is that the linkset object that is rezzed from the prim remains linked to the prim it came from. And I want it to move with that prim until it is told to delete itself leaving the source prim in place along with anyother prims associated with the prim that rezzed the second linkset. I hope that is a little more clear. I thought that's what you meant. The only small improvement in your wording is that the linkset that you rez won't be linked to the parent until it is actually rezzed and you link it on purpose. So, here's what I suggested earlier, but stated more explicitly ... Put a script in your parent object that does the following: (1) rezzes the linkset in its inventory, (2) links it to the parent object, (3) waits for you to click it and (4) if you do click it, takes actions to unlink the prims that you rezzed earlier. Specifically, it must (1) check the name of every prim in the linkset, one at a time, (2) if it finds a prim with your secret code name, unlink it. (Remember to use the same secret code name for each prim that you will want to remove.) You will need to put a script in each of the prims in the rezzed object, so that it deletes itself if it discovers that it is unlinked. That one is very easy to write ... default { changed(integer change) { if (change & CHANGED_LINK) {if (llGetLinkNumber() == 0) llDie();} } }
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-04-2009 16:49
to be clear, you have two choices
ethier you rez a separate object and link it in (and later break links) neither of which will work from an attachment, and sat upon objects will kick off any avs when they are called (not to mention getting all those persmissions) it also has issues with no-build land
or...
the prims are always there, and hidden/disabled as needed (whether you hide them by moving them, shrinking them, making them transparent, or some combo of those) this method WILL work for attachments and not unseat avs (plus has no permissions issues and works in no build areas if it's already there (attachment, pre placed, moved in, etc)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|