|
Velvet Tripp
Temptress
Join date: 4 May 2006
Posts: 51
|
08-31-2006 02:18
Hello!
I'm looking for an reliable way to create and delete a prim from an attachment. Thats what i'd like to do:
1. Attach an Attachment A. 2. A recieve a message (chat, linked, touch ... ) and rezzes Prim P from Attachment A. 3. Prim P sends a message. 4. Prim P vanishes (read: delete). 5. goto 2.
Just using an AAA-Texture will not work, cause i'd like to have the UUID of Prim P within the attachment just for several seconds.
How would I do this?
VT, Ninn
|
|
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
|
08-31-2006 02:20
llDie() will delete the object the script resides in.
So - just put a script in with the rezzed object, activate a listener and if the appropriate command is "listened" to, call llDie().
|
|
Velvet Tripp
Temptress
Join date: 4 May 2006
Posts: 51
|
08-31-2006 02:27
from the wiki: llDie will not work for attachments. Use llDetachFromAvatar instead.
... but i dont want to detach. :-/
|
|
HtF Visconti
Registered User
Join date: 21 Jul 2006
Posts: 123
|
08-31-2006 03:06
Err ... if you rez a prim from an attachment that newly rezzed prim is NOT an attachment nor should it be part of the original one - I think  If - for some strange reason - it schould ... have it unlink itself and then use llDie().
|
|
Velvet Tripp
Temptress
Join date: 4 May 2006
Posts: 51
|
08-31-2006 08:15
Works perfectly .. thanks a lot! 
|
|
Ynot Fenua
Registered User
Join date: 11 Oct 2006
Posts: 18
|
a follow up question
12-27-2006 16:22
I have a similar problem : 1) i want to be able for an attachment on command generate a prim 2) The new prim is connected to - and moves with the attachment...... 3) the attachment will also on command delete the generated prim - leaving the attachment in place.
I know how to do item : llObjectRez in the attachment
not sure how to do 2 : The only way i know of getting two prims to move in synch is to link them which you can't do when one of the prims is attached.
not sure how to do 3 since llDie wont work in attachements.
I don't want a fully working script - just some hints
Thanks.
|
|
Peekay Semyorka
Registered User
Join date: 18 Nov 2006
Posts: 337
|
12-27-2006 16:50
Your best bet is to create the whole attachment object (all rezzed & linked together). Then you can write scripts to hide / unhide portions of the attachment.
E.g, the root prim can use llMessageLinked to tell a child prim to hide itself. The child prim can then set Alpha to zero (make it invisible) and phantom to TRUE. Reverse to unhide.
-peekay
|
|
Ynot Fenua
Registered User
Join date: 11 Oct 2006
Posts: 18
|
12-27-2006 23:16
Thanks - that was sort of the conclusion i had come to pity that the rules on attachments are so limiting 
|