// Phantom door LSL script #2 // Handles the touch event. // Handles partial transparency when the door is in phantom mode. // Processing for the script when it first starts up float alpha = 0.75; // alpha value for partial transparency // of the door when in phantom mode. // 1.0 is solid, 0.0 is transparent. default { // What we do when we first enter this state state_entry() { state closed; // Move to the closed state } } // Processing for the script when it is in the closed state state closed { // What we do when we first enter this state state_entry() { llSetStatus(STATUS_PHANTOM,FALSE); // Turn off phantom property llSetLinkAlpha(LINK_SET, // Turn off transparency 1.0, ALL_SIDES); } // What we do when the door is clicked ("touched") with the mouse touch_start(integer total_number) { state open; // Move to the open state } } // Processing for the script when it is in the open state state open { // What we do when we first enter this state state_entry() { llSetStatus(STATUS_PHANTOM,TRUE); // Turn on phantom property llSetLinkAlpha(LINK_SET, // Turn on partial transparency alpha, ALL_SIDES); } // What we do when the door is clicked ("touched") with the mouse touch_start(integer total_number) { state closed; // Move to the closed state } }