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

#1 2012-06-28 09:24:42

PierceMcGeough
New Scratcher
Registered: 2012-06-27
Posts: 8

Linking sprites

I want to create like a shooting game. For now im just using the cat want the bullet to come out of his mouth.
When i hit space the bullet glides to the right of the screen (250) on the y axis
I need to link the two sprites so the bullet is always at the cats mouth

Any help thanks

Offline

 

#2 2012-06-28 10:03:08

wasabi56
Scratcher
Registered: 2012-02-10
Posts: 500+

Re: Linking sprites

First, you have to set the bullets costume center so that it is level with the cat's mouth when they are on the same "y" then use this script:

when gf clicked
forever
repeat until<key[space v] pressed?>
go to [sprite 1 v]//the cat's sprite
end
repeat until <touching[edge v]?>
move (10) steps
Hopefully this will help you  smile
play around with it to get something you really like

Last edited by wasabi56 (2012-06-28 10:07:10)


http://i.picasion.com/pic58/c23d4d2fc75f459dcf3d9ebf3e8ba395.gif
http://www.weebly.com/uploads/1/0/1/4/10146167/2294523_orig.png

Offline

 

#3 2012-06-28 10:07:33

PierceMcGeough
New Scratcher
Registered: 2012-06-27
Posts: 8

Re: Linking sprites

Got my gun working. I want a bad guy to float about the right of the screen and if comes so close to the cat it will bounce back.
I dont want it to pass x-100

Offline

 

Board footer