Conditionals and Loops
Conditional statements used in NWNScript.
| Title | Brief Description |
|---|---|
| ?: Ternary Conditional | Simple conditional operator similar to an if statement. |
| break Statement | Halts the execution of a loop or switch and skips any remaining statements within the loop or switch code block. |
| continue Statement | Skips any remaining statements within a loops current iteration, and begins execution at the beginning of the next iteration. |
| do Loop | Executes a block of code (at least once) and then repeats the block based on the value of an expression. |
| for Loop | Repeats the execution of a code block based on the value of a counter. |
| if/else Statement | Executes code blocks based on a Boolean condition. |
| switch/case Statement | Creates a series of conditional branches based on the value of a single variable. |
| while Loop | Repeats the execution of a code block based on the value of an expression. |