// Simple opacity level changing script.
// Script cycles through the values on touch.
//
// Kimm Paulino
// Written for Tanisha Benoir, Feb 2012
integer gLowestLevel = 0; // This is the most transparent setting (0, 1, 2, etc)
integer gSteps = 4; // This is the number of steps to support
// Do not change below here
integer gOpacityLevel = 0;
default
{
on_rez (integer start_param)
{
llResetScript();
}
touch_start(integer num_detected)
{
gOpacityLevel++;
if (gOpacityLevel > gSteps)
{
gOpacityLevel = gLowestLevel;
}
float opacity = (1.0/(float)gSteps) * gOpacityLevel;
llSetAlpha(opacity, ALL_SIDES);
}
}