Jump to content

Event order


steph Arnott
 Share

You are about to reply to a thread that has been inactive for 3011 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Nope.  Order is not important.  You could put your state_entry event last and the state_exit event first, if you like, and it wouldn't make any difference.  Script execution only enters an event if it is triggered by some action.  When it is triggered, execution passes to the event and stays there until all steps in the event have finished.  You cannot interrupt an event.  If there is currently no trigger, and the actions of the most recent event have finished, the script just sits there idly waiting for the next trigger.

That's not a dumb question at all, BTW.  This is right at the heart of what makes LSL a unique language, and what can make it hard for scripters with experience in other languages to get started here.

EDIT:  You may be thinking of the script's event queue.  If script execution is in an event and two or more triggering actions occur, the script cannot respond to any of them right away, so they are saved in the event queue.   As far as I know, execution from the event queue is prioritized on a first in- first served basis.

Link to comment
Share on other sites

You were typing while I was adding my EDIT note.  Yes, as far as I understand, the first event in the queue gets executed first, then the second one, and so on.  Usually that's only important if you have an event with a delay (like a dataserver event) and the possibility of having someone send it several triggering actions while it is busy.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3011 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...