A B C D E F I J K L M N O R S T U V W

Float

Float A float is an IEEE-754 32-bit floating point value ranging from ±1.401298464E-45 to ±3.402823466E+38. Examples: 9.9 10.0 100000.1 LSL floats can be specified in scientific notation, e.g. 1.123E-2 or 512E+3. Additionally, the letter f...

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...

For

The for loop is used to execute statements while a condition is true, and executes a line of code after each iteration/cycle/step. More commonly, it executes code a certain number of times, and operates a counter to facilitate it. Format: for (initialization; test;...

Functions

Functions Defined A function can be thought of as a machine into which input is provided, and which returns output. By using functions, the same blocks of code can be used over and over again, simply by referencing them. LSL and OSSL come with hundreds of built-in...

If-Else

Execute some statement(s) if a condition is true, else some other statement(s) if it is false. This is essentially the “bread and butter” of coding: the decision making inside a script. if (condition) statement else statement if (condition) {...

Integer

An integer is a signed, 32-bit value with valid range from -2147483648 to 2147483647 (that is 0x80000000 to 0x7FFFFFFF in hex). LSL does not have an unsigned integer type. Examples: 10 122 -59438 0x5465 An integer is a whole number (no decimals). If you want decimals,...