I'm just starting to play about in Scratch...
I seem to have a sprite of a cat with two 'costumes', which I guess are like frames.
I made this sequence:
...but when I click the green flag the cat moves to the right but the costumes don't switch.
If I make a simpler sequence:
...and manually change the costume in the drop-down then the costume does change.
What is the limitation here?
This is by design. By default, loops have a built-in delay of about 1/30 second. (There are ways to eliminate that delay, but that is off-topic here.) This was done to help inexperienced programmers witness the effect of a loop; possibly also to make execution speed more consistent (regardless of client's CPU power).
In your case, that means costume2 will be visible for 1/30 second before switching back to costume1. Costume1 on the other hand, is instantly followed up by costume2. Consequently, you will only see costume2.
There are various ways to fix that.
repeat 5 { move 10 steps; next costume; }
This gives both costumes an implicit 1/30 second delay. If this is still too short, add a delay (wait ... seconds
). Note: next costume
wraps around, so assuming the sprite has 2 costumes, it will flip back and forth between costume1 and costume2.glide ... secs to ...
instead of 'move and wait'.