Difference between revisions of "Category:LSL Events"

From Second Life Wiki
Jump to navigation Jump to search
(What events are and how they work?)
Line 3: Line 3:
Within states LSL works on events, such as the scripted object starting to move ([[Moving_start]]), colliding with things ([[Collision_start]]) or timer events ([[Timer]]).
Within states LSL works on events, such as the scripted object starting to move ([[Moving_start]]), colliding with things ([[Collision_start]]) or timer events ([[Timer]]).


Apparently at least the [[State_exit]] and [[State_entry]] events are local to the state. It is said that a timer set by [[LlSetTimerEvent]] is not automatically reset by state changes, but not whether or not the timer still invokes the [[Timer]] event from the original state or the current state. Also, as events should not interrupt each other, but instead they are said to be enqueued, it is unclear, whether or not a [[Timer]] event placed on the queue is replaced with the equivalent of the current state, if events in the queue before the timer event change the state.
Events do not interrupt each other, but instead are queued {{HoverText|FIFO|First In First Out}}. On state change the event queue is cleared and any open listens are [[llListenRemove|removed]] automatically. Reoccurring events ([[sensor]] and [[timer]]) are set not to reoccur in the new state and must be manually re-enabled (via [[llSensor]], [[llSensorRepeat]] or [[llSetTimerEvent]]).

Revision as of 07:02, 20 March 2007

Within states LSL works on events, such as the scripted object starting to move (Moving_start), colliding with things (Collision_start) or timer events (Timer).

Events do not interrupt each other, but instead are queued FIFO. On state change the event queue is cleared and any open listens are removed automatically. Reoccurring events (sensor and timer) are set not to reoccur in the new state and must be manually re-enabled (via llSensor, llSensorRepeat or llSetTimerEvent).