State exit/it

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

Event: state_exit( ){ ; }

Eseguito al cambio di state.


Caveats

  • Gli eventi messi in coda durante lo state_exit, sono scaricati prima che si entri nel prossimo stato. Per evitare ciò quando possibile, usate lo state_entry. Si legga state per avvisi ulteriori.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   state_entry()
   {
       llOwnerSay("sono nello stato default");
   }
   touch_start(integer detected)
   {
       state altro;
   }
   state_exit()
   {
       llOwnerSay("abbandono lo stato default");
   }

}

state altro {

   state_entry()
   {
       llOwnerSay("sono nello stato \"altro\"");
   }
   touch_start(integer detected)
   {
       state default;
   }
   state_exit()
   {
       llOwnerSay("abbandono lo stato \"altro\"");
   }

}</lsl>

Notes

Mentre lo stato default state_entry viene eseguito all'azzeramento dello script, lo stato state_exit non viene eseguito prima dell'azzeramento.

Deep Notes

Signature

event void state_exit(  );