Unofficial LSL Reference

[[events:start]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Events

Events are SL's method for notifying scripts about what's happening. Events do not execute concurrently: they run one after the other, and there's an event queue where they are stored waiting for execution of the last one to finish before the next one starts. The minimum delay between events is 0.022 seconds (one simulator frame). The function llMinEventDelay can set a higher minimum delay between events of the same type.

The event queue

If an event occurs while another event is being processed, the new event is placed in a queue, waiting for a chance to be executed.

The queue is able to hold up to 64 events. Certain events can appear in the queue only a limited number of times.

  • Touch, collision and target events, as well as timer events, can appear only once in the queue.
  • Up to two sensor and no_sensor events (or a mixture of them) can be queued.
  • Most other events can appear any number of times in the queue.

In some cases, events can be removed from the queue:

  • Events for which there is no event handler in the current state are discarded.
  • The event queue is completely cleared by either a reset or a state change.
  • Using llSetTimerEvent(0) removes any pending timer event from the queue, if present.
  • Using llSensorRemove() removes ant pending sensor or no_sensor events.

Some events are enqueued per prim rather than per script, meaning all scripts in the prim will receive them:

  • dataserver
  • object_rez
  • link_message
  • http_response

And some per object:

  • money

Event categories

Category Description
Detection Includes all events inside which detection functions are valid.
Touch Includes the touch_start, touch and touch_end events.
Collision Includes collision_* and land_collision_*.
Target Includes [not_]at_[rot_]target.

Event list