While

The statements in a while loop are executed over and over while a condition is met. Format while (condition) { statements } Note that if the condition is false initially, the statements will never be executed. Example This code will wait until it is at least 3600...

Flow Control

Flow control statements control when and where code is executed (how it flows). The following keywords are parts of LSL flow control. Keyword Purpose if-else Execute some statements if a condition is true, other statements otherwise. while Execute some statements as...

Events

LSL is an event-driven language. Literally, scripts are divided into blocks of code that are triggered when a certain event happens. Scripts can provide event handlers, like moving_end or touch_start. If a script provides an event handler, and an event of this type...

Constants

Constants are pre-defined values that do not change–they’re constant: TRUE will always equal 1. However, this does not mean that values should be used instead; while there’s no technical reason not to, constants exist to simplify your code and make...