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

#1 2010-10-05 10:01:32

MeDead2
Scratcher
Registered: 2010-08-12
Posts: 5

sprite interaction

I am making a simple game where a hand tries to catch a falling ruler. I want the person playing the game to close the hand using the spacebar. I also want the ruler to stop moving when it is touching the hand and the spacebar is pressed. I'm using the glide block for the ruler movement. I am unable to upload at this time. Any input would be appreciated.

THANKS

Offline

 

#2 2010-10-05 13:42:33

06dknibbs
Scratcher
Registered: 2008-01-29
Posts: 1000+

Re: sprite interaction

First I'd make two costumes for the hand, one with it open and one with it closed. Then give it this script.

http://i404.photobucket.com/albums/pp129/06dknibbs/3-1.gif

Create another sprite for the ruler,  although gliding probably won't work properly. Use a script like this instead, and edit it if you need to.  smile

http://i404.photobucket.com/albums/pp129/06dknibbs/4-2.gif


In the second screenshot, I changed the name of the Sprite a little. If you haven't renamed your sprites, the hand will be called Sprite 1 or Sprite 2, 3, 4 etc:

Last edited by 06dknibbs (2010-10-05 13:46:08)


http://i404.photobucket.com/albums/pp129/06dknibbs/Untitled-3-6.jpg

Offline

 

#3 2010-10-05 15:04:48

MeDead2
Scratcher
Registered: 2010-08-12
Posts: 5

Re: sprite interaction

Thanks bunches. I was wondering if using glide was causing problems.
Your code is a lot more concise than what I was trying.
Again thanks.

Offline

 

Board footer