Scripting/Events
De DigiWiki.
Manuel | Fonctions | Events | Types | Operators | Constants | Flow Control | Library | Exemples | Legend | Tutorials |
Within states LSL works on events, such as the scripted object starting to move (moving_start), colliding with things (collision_start) or a recurring timer (timer).
Events do not interrupt each other, but instead are queued FIFO, though the state_entry event can jump the queue. If more that 64 events are waiting, new events are discarded until free slots become available. If the script is paused, such as when an object is taken to inventory, pending events are preserved and handled the next time the object is rezzed. On state change the event queue is cleared and any open listens are removed automatically. Reoccurring sensor events (sensor) are set not to reoccur in the new state and must be manually re-enabled (via llSensor or llSensorRepeat), but timer events (from llSetTimerEvent) do reoccur. Please refer to the State article for further details.
For legacy LSL - the events are registered as bit flags in an unsigned-64 bit integer, meaning there can only ever be 64 events.
Trivia : event is a reserved word in LSL, but it is not used. If you try to use it as a function or variable name, it will cause a syntax error.
LSL Events List
- At rot target
- At target
- Attach
- Changed
- Collision
- Collision end
- Collision start
- Control
- Dataserver
- Event Order
- Experience permissions
- Experience permissions denied
- Http request
- Http response
- Land collision
- Land collision end
- Land collision start
- Link message
- Listen
- Money
- Moving end
- Moving start
- No sensor
- Not at rot target
- Not at target
- Object rez
- On rez
- Path update
- Remote data
- Run time permissions
- Sensor
- State entry
- State exit
- Timer
- Touch
- Touch end
- Touch start
- Transaction result