Difference between revisions of "Phantom Child"
Void Singer (talk | contribs) |
m (→Phantom Child: Using GetPrimitiveParams is overkill in this case (so I simplified it out), but thanks for the props =^_^=) |
||
Line 5: | Line 5: | ||
This code relies on a bug in Secondlife and may not function in later versions (currently server version 1.24). This script was created in part by [[User:Aeron Kohime|Aeron Kohime]] and documents this useful bug (which like invis-prims, has countless applications). | This code relies on a bug in Secondlife and may not function in later versions (currently server version 1.24). This script was created in part by [[User:Aeron Kohime|Aeron Kohime]] and documents this useful bug (which like invis-prims, has countless applications). | ||
You may use the follow script in any manner you like, excluding claiming you made it | You may use the follow script in any manner you like, excluding claiming you made it and individually reselling it without change in function (its on the wiki silly). Otherwise you can sell it as part of a product, modify it, remove my comments, etc etc. | ||
<lsl> | <lsl> | ||
Line 11: | Line 11: | ||
//WARNING: When used on the root prim it makes the entire object phantom, it | //WARNING: When used on the root prim it makes the entire object phantom, it | ||
// also does not function correctly on tortured prims. (Sorry.) | // also does not function correctly on tortured prims. (Sorry.) | ||
//Reset on Sim restart added by Void Singer | //Reset on Sim restart added by Void Singer | ||
default { | default { | ||
state_entry() { | state_entry() { | ||
list prim = | list prim = PRIM_TYPE + llGetPrimitiveParams([PRIM_TYPE]); | ||
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, | llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, | ||
0, <0,1,0>, 0, <0,0,0>, <1,1,0>, <0,0,0>, | 0, <0,1,0>, 0, <0,0,0>, <1,1,0>, <0,0,0>, |
Revision as of 17:00, 5 April 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Phantom Child
This easy to use code when put into a child prim of a linkset will make thay child and only that child phantom, even when taken into inventory and re-rezzed. You can use multiple copies of this script to make multiple children of a linkset phantom.
This code relies on a bug in Secondlife and may not function in later versions (currently server version 1.24). This script was created in part by Aeron Kohime and documents this useful bug (which like invis-prims, has countless applications).
You may use the follow script in any manner you like, excluding claiming you made it and individually reselling it without change in function (its on the wiki silly). Otherwise you can sell it as part of a product, modify it, remove my comments, etc etc.
<lsl> //Phantom Child Script by Aeron Kohime //WARNING: When used on the root prim it makes the entire object phantom, it // also does not function correctly on tortured prims. (Sorry.) //Reset on Sim restart added by Void Singer
default {
state_entry() { list prim = PRIM_TYPE + llGetPrimitiveParams([PRIM_TYPE]); llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, 0, <0,1,0>, 0, <0,0,0>, <1,1,0>, <0,0,0>, PRIM_FLEXIBLE, TRUE, 0, 0, 0, 0, 0, <0,0,0>] + prim); }
on_rez(integer s) { llResetScript(); }
changed (integer vBitChanges){ if (CHANGED_REGION_START & vBitChanges){ llResetScript(); } }
} </lsl>