Morrowind Mod:While

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search


while
endwhile

                while ( LeftValue CompareOp RightValue )
                        < statements >
                endwhile

       Where:   LeftValue  = Local/global variable or function call
                CompareOp  = ==, <=, <, >, >=, !=
                RightValue = Local/global variable or numeric literal value
                Statements = Zero or more statements to execute

        Type:   System

     Returns:   none

     Example:   while ( GetStrength < 90 )
                        ModStrength, 1
                endwhile

     Scripts:   

The while is the only loop statement available in the scripting language. The while loop is executed within one frame until the condition is satisfied. This can cause an unwanted pause in the game if there are many loops required.