State exit/it

From Second Life Wiki
< State exit
Revision as of 06:26, 15 January 2012 by Violet Hammerer (talk | contribs) (Created page with "{{LSL_Event |event_id=1|event_delay|event=state_exit |event_desc=Eseguito al cambio di state. |constants |spec |caveats= * Gli eventi messi in coda durante lo state_exit,…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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(  );