by Brayla Sana | Apr 19, 2016 | Flow Control, LSL, OSSL, Wiki
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...
by Brayla Sana | Apr 19, 2016 | Flow Control, LSL, OSSL, Wiki
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...
by Brayla Sana | Apr 19, 2016 | Events, LSL, OSSL, Wiki
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...
by Brayla Sana | Apr 19, 2016 | LSL, OSSL, Wiki
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...