|
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
|
01-29-2007 20:41
prim a, prim b and prim c prim a is an on/off button to rezz prim c which is attached to prim b prim b will be able to be moved around manually, naturally prim b needs to have a rezzable prim(c) attached to it that would always rezz in the same relative position to prim b
for instance, prim b has a face facing north and prim c rezzs north by cliking prim a (prim a is unlinked to other prims), I manually turn prim b to face south and prim c will now face south when rezzed prim c would have to be able to completely rezz and unrezz by clicking prim a. any of this make sense? Thanks in advance and I apologize for my lack of scripting knowledge (or time to learn).
|
|
Dustin Widget
Script Monkey for hire
Join date: 15 Feb 2006
Posts: 101
|
01-29-2007 21:21
Scripting tips is for help on scripts, not a script writing service.
Look under products wanted or services.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
01-30-2007 00:35
From: Max Pitre prim a, prim b and prim c prim a is an on/off button to rezz prim c which is attached to prim b prim b will be able to be moved around manually, naturally prim b needs to have a rezzable prim(c) attached to it that would always rezz in the same relative position to prim b
for instance, prim b has a face facing north and prim c rezzs north by cliking prim a (prim a is unlinked to other prims), I manually turn prim b to face south and prim c will now face south when rezzed prim c would have to be able to completely rezz and unrezz by clicking prim a. any of this make sense? Thanks in advance and I apologize for my lack of scripting knowledge (or time to learn). Why bother with rezzing prim C? just make it visible / invisible on command. Is prim A attached to Prim B/C or is it totally seperate? If A is attached then just use llSetLinkAlpha, if not you will need a listen in prim B or C.
|
|
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
|
01-30-2007 04:28
From: Newgate Ludd Why bother with rezzing prim C? just make it visible / invisible on command. Is prim A attached to Prim B/C or is it totally seperate?
If A is attached then just use llSetLinkAlpha, if not you will need a listen in prim B or C. That's how I originally made it and it works great that way except it creates an invisible phantom "wall" which I can not have, people need to click through that air space. I don't care if that "wall" is there when prim c is rezzed but it can not be there when it's not rezzed. And no, prim a is not attached to anything.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
01-30-2007 05:59
From: Max Pitre That's how I originally made it and it works great that way except it creates an invisible phantom "wall" which I can not have, people need to click through that air space. I don't care if that "wall" is there when prim c is rezzed but it can not be there when it's not rezzed. And no, prim a is not attached to anything. Fair enough, just making sure we wheren't trying to over complicate things. You could always change the size and position of Prim C so that its 'hidden' inside Prim B. If not then you will need to rez the prim using llRezObject() and then link it to Prim B. You use the object_rez event handler for this, i.e. object_rez(key id) { llCreateLink(id, 1); // We are the parent. }
When you want to unrez the object you will need to break the link using llBreakLink(integer num) and then a changed handler in the object to cause it to kill itself. changed(integer change) { if (change & CHANGED_LINK) // linked/unlinked/sat on { if (llGetLinkNumber() == 0) // now i'm a single prim linked to nothing llDie(); // so i die } }
|