Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 2D Blocks
  4. The "Repeat Until" Block

The "Repeat Until" Block

Scheduled Pinned Locked Moved 2D Blocks
1 Posts 1 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Prerequisite

    • Working with Blocks

     

    Description

    The “repeat until” block is a C block with boolean input in the control category.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/958d8797-899d-428c-84d1-9d289dfd28d8.PNG" width="550" style="">
     

    How does this block work?

    This block will keep repeating the blocks inside it until a condition becomes true. In other words, this block will check the condition first, and if the condition is not true, it will run all the blocks inside its "mouth’ once, then it checks the condition again. If the condition is still not true, then the blocks inside will run again …

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/890b230f-df08-4559-9609-5aff14b1d539.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
     

    If the condition is already true

    If the condition given to the “repeat until” block is already true, then the blocks inside will NOT run at all.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/bca74673-0402-4c47-a468-ddf326bbfbac.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
     

    Animation with “Repeat until” Block

    Here is how you can create an animation with repeat until block. Since the butterfly is not touching the flower, the condition is false for the repeat until block in the beginning. Therefore, the blocks inside will make the butterfly move down repeatedly. When the butterfly becomes touching the flower, the condition becomes true. At that time, the blocks below the “repeat until” block will run instead.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f78a0eb7-7306-4047-9f2d-eb999ac25e51.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
     

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode