Difference between revisions of "State exit"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{LSL_Event
{{LSL_Event
|event_id=1|event_delay|event=state_exit
|event_id=1|event_delay|event=state_exit
|event_desc=Triggered on any state transition
|event_desc=Triggered on a qualifying [[state]] transition.
|constants
|constants
|spec
|spec
Line 48: Line 48:
|deprecated
|deprecated
|cat1=Script
|cat1=Script
|cat2
|cat2=State
|cat3
|cat3
|cat4
|cat4
}}
}}

Revision as of 14:03, 27 September 2007

Description

Event: state_exit( ){ ; }

Triggered on a qualifying state transition.


Caveats


Examples

default
{
    state_entry()
    {
        llOwnerSay("in default state");
    }
    touch_start(integer detected)
    {
        state other;
    }
    state_exit()
    {
        llOwnerSay("leaving default state");
    }
}

state other
{
    state_entry()
    {
        llOwnerSay("in state \"other\"");
    }
    touch_start(integer detected)
    {
        state default;
    }
    state_exit()
    {
        llOwnerSay("leaving state \"other\"");
    }
}

Deep Notes

Signature

event void state_exit(  );