Project 1 · A game of your own · Build
What we are making: the thing itself, working end to end. Not finished — working.
You play it once and it works. You click the green flag again and the score carries on from where it was, or the sprite is still where you left it.
That is because starting the game and setting things up are two different jobs. Every
sprite needs its own when green flag clicked that puts it back where it belongs
and resets anything that counts.
| What you see | Why | What to do |
|---|---|---|
| The score keeps going up forever | The forever loop has no pause. | Add a short wait, or make the apple vanish and reappear after it is caught. |
| It works once, then not again | Nothing resets on the green flag. | Give every sprite a green-flag script that sets its position and its variables. |
| The sprite goes off the edge and never comes back | No limit on the movement. | Use if on edge, bounce, or check the x position before moving. |
| Two things happen at once and it looks wrong | Two scripts are both running. | That is normal in Scratch. Decide which one should win and use a variable to stop the other. |
In this session