Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Sprite not reacting to other sprites
- ourlifestar
-
New Scratcher
3 posts
Sprite not reacting to other sprites
I am brand new to scratch but wanting to teach it to my students. I followed a tutorial for making a maze. As far as I can tell my code is exactly the same as the tutorial and yet I have tried to code so that the hare sprite returns to the beginning when it touches the food truck and ends the game when it touches the unicorn. But while the hare does return to the beginning when it touches the walls of the maze, it just goes behind the other sprites. Any advice or things I should be tweaking? I would be so appreciative!
Here is the project:
https://scratch.mit.edu/projects/834796755
Here is the tutorial I followed:
https://wiingy.com/blog/make-a-maze-game-on-scratch/
Here is the project:
https://scratch.mit.edu/projects/834796755
Here is the tutorial I followed:
https://wiingy.com/blog/make-a-maze-game-on-scratch/
- deck26
-
Scratcher
1000+ posts
Sprite not reacting to other sprites
Your script to detect touching the unicorn doesn't have a hat block so isn't running.
Your hare doesn't need to keep setting left-right rotation style - once this is set you can forget about it.
Your hare doesn't need to keep setting left-right rotation style - once this is set you can forget about it.
- ourlifestar
-
New Scratcher
3 posts
Sprite not reacting to other sprites
Thank you! I added the hat blocks, but it still seems that the hare just goes behind the other sprites. I must be missing something else!
- 10data10
-
Scratcher
100+ posts
Sprite not reacting to other sprites
It looks like a nice tutorial (https://wiingy.com/blog/make-a-maze-game-on-scratch/) but it goes step by step and is very long.
However, I got to the bottom and noticed that your use of the forever block in the scripts that detect the other sprites is different from their picture of the final project.

However, I got to the bottom and noticed that your use of the forever block in the scripts that detect the other sprites is different from their picture of the final project.

- colinpenguin
-
Scratcher
100+ posts
Sprite not reacting to other sprites
Use this script
This will make the hare appear in front of the other sprites. Hope that helped!
when green flag clicked
go to [front v] layer :: looks
This will make the hare appear in front of the other sprites. Hope that helped!
- medians
-
Scratcher
1000+ posts
Sprite not reacting to other sprites
Also, the touching color white only runs once, touching duck, and the touching food truck because they're not in forever loops.
The forever loop only runs if the condition is true at the beginning, and should instead go around the if statement, rather than inside of it.
ALSO WHY WITH THE COLOR SWAP!! START SOUND!!
i am being bullied D:
The forever loop only runs if the condition is true at the beginning, and should instead go around the if statement, rather than inside of it.
Use this scriptStop..when green flag clicked
go to [front v] layer :: looks
This will make the hare appear in front of the other sprites. Hope that helped!
ALSO WHY WITH THE COLOR SWAP!! START SOUND!!
i am being bullied D:
Last edited by medians (April 16, 2023 14:37:53)
- ourlifestar
-
New Scratcher
3 posts
Sprite not reacting to other sprites
Thank you everyone! I have gotten it working now and am so thankful for the help! 

- WiingyClasses
-
New Scratcher
1 post
Sprite not reacting to other sprites
The blog (https://wiingy.com/blog/make-a-maze-game-on-scratch/) is lengthy with step-by-step explanations which makes it easy to follow. Also, all the images in the blog are totally right as per the respective step.
Last edited by WiingyClasses (April 25, 2023 21:16:08)
- Discussion Forums
- » Help with Scripts
-
» Sprite not reacting to other sprites