Triggered on a qualifying state transition.
state_exit()
Event ID: 1.
default
{
state_entry()
{
llOwnerSay("Entering default state");
}
touch_end(integer detected)
{
// Note: NEVER do a state change from a touch_start event -
// - this can result in a missed touch_start on re-entering this state
// Here we do the state change safely from within touch_end
state other;
}
state_exit()
{
llOwnerSay("leaving default state");
}
}
state other
{
state_entry()
{
llOwnerSay("Entering state \"other\"");
}
touch_end(integer detected)
{
state default;
}
state_exit()
{
llOwnerSay("leaving state \"other\"");
}
}
While the default state_entry is triggered on script reset, state_exit is not triggered prior to the reset.