Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //linkset texture changer using llSetLinkPrimitiveParamsFast
- // setup for furniture cloth changer
- // G.Guitar 2015.03.03
- //Variables to make this easier for me, anyway
- // set face values here, then use the variable name in the parameters
- integer facea = 3;
- //integer faceb = 0;
- // set link numbers here, then use the variable name in the parameters
- // linkset flags to use instead of numbers
- // LINK_ROOT
- // LINK_SET (all prims)
- // LINK_ALL_OTHERS (all other prims)
- // LINK_ALL_CHILDREN (everything but the root)
- // LINK_THIS (the prim the script is in)
- //integer linkno1 = 2;
- //integer linkno2 = 4;
- integer linkno5 = 5;
- //integer linkno4 = 6;
- //integer linkno5 = LINK_ALL_OTHERS; // this one commented in the active part of the script - uncomment BOTH to make it active
- integer texture;
- integer total;
- default {
- state_entry() {
- total = llGetInventoryNumber(INVENTORY_TEXTURE);
- }
- touch_start(integer number) {
- integer i = llGetNumberOfPrims();
- for( ; i >= 0; --i ) {
- // llSetLinkPrimitiveParamsFast (linkno1, [PRIM_TEXTURE, facea, (llGetInventoryName(INVENTORY_TEXTURE, texture)), <1,1,0>, <0,0,0>, 0]);
- // llSetLinkPrimitiveParamsFast (linkno2, [PRIM_TEXTURE, facea, (llGetInventoryName(INVENTORY_TEXTURE, texture)), <1,1,0>, <0,0,0>, 0]);
- // llSetLinkPrimitiveParamsFast (linkno3, [PRIM_TEXTURE, facea, (llGetInventoryName(INVENTORY_TEXTURE, texture)), <1,1,0>, <0,0,0>, 0]);
- // llSetLinkPrimitiveParamsFast (linkno4, [PRIM_TEXTURE, facea, (llGetInventoryName(INVENTORY_TEXTURE, texture)), <1,1,0>, <0,0,0>, 0]);
- llSetLinkPrimitiveParamsFast (5, [PRIM_TEXTURE, facea, (llGetInventoryName(INVENTORY_TEXTURE, texture)), <4,4,0>, <0.5,0.5,0>, 0]);
- }
- ++texture;
- if( texture == total )
- texture = 0;
- }
- changed(integer change) {
- if( change & CHANGED_INVENTORY ) {
- llResetScript();
- }
- }
- }
- // end script
- //============================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement