This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-03-07 23:37:47

kitsunilla
Scratcher
Registered: 2010-03-07
Posts: 2

I can't get my sprites to touch!

For some background information, I'm using Scratch for a science project. In particular, the Science Buddies "Want to Make a Video Game? Here's How!" science fair project.

I managed to get most of it to work correctly, but when I tried to program "the end of the game", I got totally stuck.  I currently have everything programmed so that when the cat is touched by the dog (which chases the cat), "Game Over" should appear, and all the script running would stop.

BUT, it's not working. I've done some playing around, and it seems that it's not acknowledging that the cat and he dog are touching. I mean, I could be wrong about that, but I've tried the "if touching" command for other things (e.g. cat meows when touching mouse pointer), and they won't work either.

So... help?

(Sorry if this was too long, or hard to understand.)

Oh, and if this helps, here are the current scripts for the cat and game over sprites:

http://i963.photobucket.com/albums/ae112/kitsunilla/untitled.jpg

http://i963.photobucket.com/albums/ae112/kitsunilla/untitled2.jpg

Offline

 

#2 2010-03-07 23:55:09

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: I can't get my sprites to touch!

Ah, I see your problem. The script isn't continously checking for if the cat is touching the dog. You need to put a 'forever' block in there. Actually, there's more than that... here, use this script:

http://img10.imageshack.us/img10/9346/68simplemovingchasescri.png

Any questions?


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-03-08 10:34:13

kitsunilla
Scratcher
Registered: 2010-03-07
Posts: 2

Re: I can't get my sprites to touch!

I just tried that and it works! Thank you so much!

Offline

 

Board footer