State entry
De DigiWiki.
Triggered on any state transition and startup.
default { state_entry() { // PUBLIC_CHANNEL has the integer value 0 llSay(PUBLIC_CHANNEL, "You either just saved the script after editing it" + "\nand/or the script (re)entered the default state."); // white and opaque text llSetText("Click to change states", <1.0, 1.0, 1.0>, (float)TRUE); } touch_start(integer num_detected) { state other; } state_exit() { llSay(PUBLIC_CHANNEL, "The script leaves the default state."); } } state other { state_entry() { llSay(PUBLIC_CHANNEL, "The script entered the other state."); state default; } state_exit() { llSay(PUBLIC_CHANNEL, "The script leaves the other state."); } }


