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

#1 2011-08-12 15:52:59

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

How do you make a gun

If somebody could tel me how I make a gun attached to a sprite and the gun can not be the same sprite it would be greatly appreciated.


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2011-08-12 16:03:38

oxguy17
Scratcher
Registered: 2011-07-28
Posts: 2

Re: How do you make a gun

First Go to make a sprite and make your gun. Below the color selection the is a button that says set center set the center to wherever you want the person to hold it. Next in the gun's scripts add a script like this: put a when flag clicked block first then under it put a forever loop in the loop put a<go to x sad   )y sad   . then go to sensing palette and get a x position of (whatever sprite you want) block and put it in x of the go to x() y() block do the same with y position and tada you got a gun that stays in hand (or wherever th center of the person is set to)

Offline

 

#3 2011-08-12 16:13:04

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Re: How do you make a gun

That doesnt work because it doesnt stay on the guy when he moves


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#4 2011-08-12 16:41:56

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: How do you make a gun

4lover wrote:

That doesnt work because it doesnt stay on the guy when he moves

If the gun sprite was named Gun, and the character was named Character,
Make the gun sprite, then put

When green flag clicked
forever
Set X position to X Position of Character
Set Y position to Y Position of Character
/forever
(I meant that to not be in blocks xD)

If this isn't what you want, elaborate more, please. There isn't really enough detail.


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#5 2011-08-12 17:24:35

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Re: How do you make a gun

never mind I fixed my gun


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

Board footer