0% found this document useful (0 votes)
2 views

Loops

Loops, or iteration, allow for the repetition of instructions based on a condition or number, making it easier to execute actions multiple times without tedious copying. The Repeat block specifies the number of repetitions, while Forever blocks enable indefinite execution of code. These looping concepts can be applied to various sprite animations and effects in programming.

Uploaded by

Kenji Abanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Loops

Loops, or iteration, allow for the repetition of instructions based on a condition or number, making it easier to execute actions multiple times without tedious copying. The Repeat block specifies the number of repetitions, while Forever blocks enable indefinite execution of code. These looping concepts can be applied to various sprite animations and effects in programming.

Uploaded by

Kenji Abanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

● Loops (also called iteration) repeat a set of instructions, usually based on a number or a

condition.
● When the specified action should be repeated more than 4 times (ex: 370 times),
copying and pasting the same action would be tedious. To achieve this, the Repeat
block can be used to specify how many times a block of code will be repeated.
● Forever blocks can be used to run a code indefinitely (or until computer resources are
emptied)
● These concepts can be used for
○ Dancing sprites
○ Jumping sprite
○ Jumping again and again
○ Walking sprite
○ Ghost sprite
○ Bigger sprite, then smaller
○ Change backdrop brightness

You might also like