// State declaration of the default state (mandatory, always first) default { touch_end(integer n) { // State switch statement that switches to the 'open' state state open; } } // State declaration of an additional state we've called 'open' state open { state_entry() { llSetPos(llGetLocalPos() - <0.3, 0, 0>); } touch_end(integer n) { // State switch statement that switches to the default state state default; } state_exit() { llSetPos(llGetLocalPos() + <0.3, 0, 0>); } }