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

#1 2012-09-27 12:24:00

Carolinema
New Scratcher
Registered: 2012-09-26
Posts: 5

Attaching 2 sprites

Hi, I am new to Scratch. I am doing a game where a sprite has to move according to the co-ordinates given by the player. I want the cat to carry a hockey stick - another sprite - but how can I get the second sprite to move along with the first Sprite? Thanks for any info!

Offline

 

#2 2012-09-27 12:39:14

Blayer98
Scratcher
Registered: 2012-03-22
Posts: 100+

Re: Attaching 2 sprites

just import the hockey stick on the scratch cat, by copying the first sprite, then click on paint, then import, and find the hockey stick. now move it to where you want the scratch cat to hold it.


http://i50.tinypic.com/16lwmlj.png
The first Collab to have it's very own Cloud Variables! Coming Soon!

Offline

 

#3 2012-09-27 12:41:37

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: Attaching 2 sprites

Blayer98 wrote:

just import the hockey stick on the scratch cat, by copying the first sprite, then click on paint, then import, and find the hockey stick. now move it to where you want the scratch cat to hold it.

As the hockey stick is a different script, this won't work. Instead, use this:

forever
set x to (([x position v] of [scratch cat v]) + (a))
set y to (([y position v] of [scratch cat v]) + (b))
^^ for the hockey stick sprite, and change the values of a and b until it looks correct.

Last edited by Prestige (2012-09-27 12:41:52)


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#4 2012-09-27 15:54:06

Carolinema
New Scratcher
Registered: 2012-09-26
Posts: 5

Re: Attaching 2 sprites

Thank you folks for the help!!

Offline

 

#5 2012-10-04 20:50:51

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: Attaching 2 sprites

You could also do this:

forever
go to [cat v]
And change the cat's costume center until it works. The costume center is where a sprite goes when it is told to go to that sprite. You can change it using 'set costume center [ + ]' in the paint editor.


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&action=projects&type=newest&return=image&num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&action=onlineStatus&type=text

Offline

 

#6 2012-10-18 19:53:47

websites
New Scratcher
Registered: 2012-10-18
Posts: 9

Re: Attaching 2 sprites

If you were to rotate the cat sprite and wanted to keep the hockey stick anchored to the relocated attachment point how would you do that?

Offline

 

Board footer