Touch to Disappear

Written by: Headmaster
// Touch to make an object disappear and reappear.
//
// Kimm Paulino
// Sept 2011
// Jan 2013: Update to affect entire linkset
 
integer gGone = FALSE;
 
default
{
    state_entry()
    {
        gGone = FALSE;
    }
 
    touch_start(integer total_number)
    {
        if (gGone)
        {
            llSetLinkAlpha (LINK_SET, 1.0, ALL_SIDES);
            gGone = FALSE;
        }
        else
        {
            llSetLinkAlpha (LINK_SET, 0.0, ALL_SIDES);
            gGone = TRUE;
        }
    }
}