// States in LSL example by Jim Bunderfeld integer x = 0; default { state_entry() { llOwnerSay("entry default"); } state_exit() { llOwnerSay("exit default"); } touch_start(integer total_number) { if (x == 0) { llSay(0,"Chakra System Engaged"); x = 1; llSleep(0.5); state k; // change to state k. } } } state k { state_entry() { llOwnerSay("entry k"); } state_exit() { llOwnerSay("exit k"); } touch_start(integer total_number) { if (x == 1) { llSay(0,"Chakra System Disengaged"); x = 0; state default; // change to default. } } }