Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How can I make the sprites collide?
- cmyrland
-
6 posts
How can I make the sprites collide?
Hi..
I am trying to make my sprites collide in my little game http://scratch.mit.edu/projects/14324137/ .. I'm still just learning the basics here, and thought that this game might serve as a tutorial for my students in the future.
But my big issue is: I cannot get the sprites to be on the same layer in the game! Either the cat is in front, or the apple is in front. I've made a script for the apple to disappear when they collide, but I can't seem to trigger it. Can somebody take a look at my code and tell me what I'm doing wrong?
I am trying to make my sprites collide in my little game http://scratch.mit.edu/projects/14324137/ .. I'm still just learning the basics here, and thought that this game might serve as a tutorial for my students in the future.
But my big issue is: I cannot get the sprites to be on the same layer in the game! Either the cat is in front, or the apple is in front. I've made a script for the apple to disappear when they collide, but I can't seem to trigger it. Can somebody take a look at my code and tell me what I'm doing wrong?
- cmyrland
-
6 posts
How can I make the sprites collide?
Nevermind. Fixed it! I forgot to add the “forever” control block to the apple's script.
- k9lego
-
1000+ posts
How can I make the sprites collide?
Here, try this:
k9lego
Put this in the Cat. (Player)
Put this in the Apple

Last edited by k9lego (Nov. 23, 2013 16:15:36)
- Photoguy77
-
100+ posts
How can I make the sprites collide?
Unfortunately, this is not possible. Are there any other questions that you have abut the project?
- cmyrland
-
6 posts
How can I make the sprites collide?
Here, try this:Put this in the Cat. (Player)Put this in the Applek9lego
Kthx. I just added a forever-loop to my hide-script for my apple. Does it matter if I do it my way or yours? Any pros/cons?
- Photoguy77
-
100+ posts
How can I make the sprites collide?
What way is yours? I may be able to help you determine which way to use.
- cmyrland
-
6 posts
How can I make the sprites collide?
Unfortunately, this is not possible. Are there any other questions that you have abut the project?
It's all good now. Appears the layers-thing was a dead end.

- cmyrland
-
6 posts
How can I make the sprites collide?
What way is yours? I may be able to help you determine which way to use.
See my project page. I put the full hide-script on the apple. K9love's.. well, see above.
- epicks
-
1 post
How can I make the sprites collide?

- deck26
-
1000+ posts
How can I make the sprites collide?
Please create your own new topic rather than necroposting.im wanting to collide withe objects like in a platformer
- bluepinkturquoise
-
1 post
How can I make the sprites collide?
I need to know how to collide sprites and when I do collide them I want that to change the backdrop
- Discussion Forums
- » Help with Scripts
-
» How can I make the sprites collide?