Skip to content
lsl.devlsl.devLSL Dev

Flow control

The syntax below is from the LSL definitions.

ConstructSyntax
if / elseif (<condition>) { ... } else { ... }
forfor (<initializer>; <condition>; <post-iteration-statement>) { ... }
whilewhile (<condition>) { ... }
dodo { ... } while (<condition>);
jumpjump <label>
returnreturn [<variable>]; “Leave current event or function.”
statestate <target> “If the target state is not the same as the current one, change to the target state.”