GM: Do-until

From GMpedia.org Wiki

(Redirected from GM: do-until)
Jump to: navigation, search
This article is about the Game Maker do-until loop, for the loop in general, see Do-until.

The Game Maker do-until is a type of different loops in Game Maker. Its syntax is as follows:

do
{
    <statement>
}
until(<expression>)

The do-until loop repeats the <statement> until the <expression> is true. Each times it performs the <statement>, it then evaluates the <expression>, if it is true, it stops and moves to the next action, if it is false, the loop is repeated, then the statement is re-evaluated, and so on.

One of the major troubles with the do-until loop is that writing a wrong <expression> will result in an infinity-loop, which will result in crashing the game.

[edit] See Also

Personal tools