State exit

From Second Life Wiki
Revision as of 13:42, 27 February 2009 by Strife Onizuka (talk | contribs)
Jump to navigation Jump to search

Description

Event: state_exit( ){ ; }

Triggered on a qualifying state transition.


Examples

<lsl>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\"");
   }

}</lsl>

Notes

While the default state_entry is triggered on script reset, state_exit is not triggered prior to the reset.

Deep Notes

Signature

event void state_exit(  );