/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
default { on_rez(integer param) { // Extract color coded in parm, set our own color integer j = param % 100; if (j == 0) llSetColor(<0.0,1.0,1.0>,ALL_SIDES); // cyan else if (j == 1) llSetColor(<1.0,1.0,0.0>,ALL_SIDES); // yellow else if (j == 2) llSetColor(<0.0,1.0,0.0>,ALL_SIDES); // green else if (j == 3) llSetColor(<1.0,0.0,0.0>,ALL_SIDES); // red else if (j == 4) llSetColor(<0.0,1.0,0.0>,ALL_SIDES); // green else if (j == 5) llSetColor(<1.0,1.0,0.0>,ALL_SIDES); // yellow else if (j == 6) llSetColor(<0.0,1.0,1.0>,ALL_SIDES); // cyan else if (j == 7) llSetColor(<1.0,0.0,1.0>,ALL_SIDES); // magenta // Alter our size llSetPrimitiveParams([PRIM_SIZE,<0.01,0.01,(float) param / 100000>]); // We're done -- remove ourselves llRemoveInventory(llGetScriptName()); } }
URL: http://zonjacapalini.wordpress.com/2009/07/20/2889-working-with-very-large-linksets-in-opensim/