Difference between revisions of "Phantom Child"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎Phantom Child: Using GetPrimitiveParams is overkill in this case (so I simplified it out), but thanks for the props =^_^=)
Line 12: Line 12:
//        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
//Strife Onizuka was here doing simplification


default {
default {
     state_entry() {
     state_entry() {
        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>,
             PRIM_FLEXIBLE, TRUE, 0, 0, 0, 0, 0, <0,0,0>] + prim);
             PRIM_FLEXIBLE, TRUE, 0, 0, 0, 0, 0, <0,0,0>,
            PRIM_TYPE] + llGetPrimitiveParams([PRIM_TYPE]));
     }
     }



Revision as of 18:14, 5 April 2009

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 //Strife Onizuka was here doing simplification

default {

   state_entry() {
       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_TYPE] + llGetPrimitiveParams([PRIM_TYPE]));
   }
   on_rez(integer s) {
       llResetScript();
   }
   changed (integer vBitChanges){
       if (CHANGED_REGION_START & vBitChanges){
           llResetScript();
       }
   }

} </lsl>