Discuss Scratch

timnobody123
Scratcher
9 posts

Help with Simon Game

I'm making a simple Simon game (because why not) and I'm running into a problem where “completed” is set to t when it shouldn't be. “completed” is supposed to be set to t when the user clicks on the wrong square, which stops a “repeat until” loop, but it gets set to t no matter what square I click.
I would appreciate any help.
Here's the game link: https://scratch.mit.edu/projects/797695004/
deck26
Scratcher
1000+ posts

Help with Simon Game

Why use a forever loop to detect a mouse click in a custom block? A simple when this sprtie clicked hat block should be fine.

You're checking the positionGuessed too quickly after detecting mouse down. Add a short wait to give the appropraite sprite time to update the variable.

Last edited by deck26 (Feb. 8, 2023 16:53:34)

Powered by DjangoBB