Zho:重复直到 ()（积木）

The Repeat Until  积木 is a 控制类积木 and a 半框形积木. Blocks held inside this block will loop until the specified 菱形积木 statement is true, in which case the code beneath the block (if any) will execute. This loop is in similar nature to a  loop in some other 编程语言.

用法示例
As this block loops pieces of code until a condition is true, the block is the best way to run code until a desired condition has been reached. Some common uses: 重複直到 <(x座標) = [100]> 移動 (10) 點 end 重複直到 <<滑鼠鍵被按下？> 不成立> 定位到 [鼠標 v] 位置 end 重複直到 . . . end 計時器重置 重複直到 <(計時器) > (limit)> . . . end
 * Moving a sprite until its X or y 座標 is at a certain amount
 * Having a sprite stick to the mouse until the mouse is not down
 * Waiting for an event while performing an action
 * 重复一个设定好的时间

应用
This block can be worked around with the following code:

重複無限次 . . . 如果 那麼 廣播訊息 [next v]   停止 [這個程式 v]  end end

當收到訊息 [next v] .. .

These can break scripts and should be avoided when making 一角色一脚本类专案 专案, however.

参见

 * 重复 次
 * 重复无限次
 * 重复无限次如果