Example Snapback script
Edie_Shoreland Feb 20th, 2019 (edited) 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- //This is an example of how to "snap back" elements of a
- //necklace or hip chain back to their original size after
- //the entire object has been resized to fit the user's
- //shape. It puts more space between the links rather than
- //increasing them in size.
- //This script was originally used in a candy hip chain to
- //keep the "candy" in the hip chain the same size as the
- //candy in the necklace when the hip chain was fitted to
- //larger bodies.
- //The principles can be tailored towards specific elements
- //in a build if you want to allow the user to mod the item
- //with the option of an "Undo" or to allow the user to in-
- //crease the area of a build without resizing the individual
- vector origsize = <0.02630, 0.01175, 0.02630>;
- //This is the size I want the "candy" for both objects
- changed(integer change)
- if (change & CHANGED_SCALE)
- llSetLinkPrimitiveParamsFast(LINK_ALL_OTHERS,[PRIM_SIZE, origsize]);
- //If you want different sizes for various prims, you can always store
- //sizes for each link in the script with llObjectPrimCount, a loop,
- //and llGetLinkPrimitiveParams(counter,[PRIM_SIZE]) in state_entry().
RAW Paste Data