From EDukeWiki
Jump to navigation Jump to search

whilee <gamevar <value | gamevar> {code to execute}

whilevare <gamevar> <value> { code to execute }

whilevarvare <gamevar> <gamevar> { code to execute }

Executes the code in the curly braces as long as <gamevar> equals <value>. This is a simple while loop.

Caution: Poor execution or endless loops will cause your game to close without error or simply stall and crash!

Commands with an additional "var" suffix take gamevars rather than constants or defined labels for their inputs. As an alternate short form, "varvar" can be dropped from these commands; for example ife serves an an alias for ifvarvare.