Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a gun fire a bullet?
- brain39143
-
40 posts
How to make a gun fire a bullet?
I know that there are lots of topics about this but none of them are working for this game I'm working on. It is about tanks firing bullets from it's turret here's the link https://scratch.mit.edu/projects/97762775/#editor
- haileys126
-
2 posts
How to make a gun fire a bullet?
I need help! I heard that when you have an account on Scratch that you have a book bag. How do I use it? Please reply ASAP!!! 

- brain39143
-
40 posts
How to make a gun fire a bullet?
Please do not start another question on this form, start another I need help! I heard that when you have an account on Scratch that you have a book bag. How do I use it? Please reply ASAP!!!
- asivi
-
1000+ posts
How to make a gun fire a bullet?
This topic doesn't belong to you, please, create your own. I need help! I heard that when you have an account on Scratch that you have a book bag. How do I use it? Please reply ASAP!!!
Regards.
- asivi
-
1000+ posts
How to make a gun fire a bullet?
Hi brain39143, https://scratch.mit.edu/projects/97772350/
this is a your project' remix, i've made some changes to the bullet' costumes pointting it to right and moving its position a little.
I've added a new space key in tank1 for fire the bullet, and create a clone for it.
Greets.
Edit: i've changed some things under the space key pressed and created a new local variable for the clone of bullet in order to identify it.
this is a your project' remix, i've made some changes to the bullet' costumes pointting it to right and moving its position a little.
I've added a new space key in tank1 for fire the bullet, and create a clone for it.
Greets.
Edit: i've changed some things under the space key pressed and created a new local variable for the clone of bullet in order to identify it.
Last edited by asivi (Feb. 13, 2016 15:05:55)
- scrooch2005
-
33 posts
How to make a gun fire a bullet?
https://scratch.mit.edu/projects/97762775/#editorI know that there are lots of topics about this but none of them are working for this game I'm working on. It is about tanks firing bullets from it's turret here's the link First: create 2 sprites: the bullet, the gun. And create 2 variables: gun X, gun Y
Second: Click the gun and put in these scripts:
Third: Click the bullet and insert these scripts:
You can try that, I hope it works for you.
Scratch on!

Last edited by scrooch2005 (Feb. 13, 2016 07:35:02)
- brain39143
-
40 posts
How to make a gun fire a bullet?
Thank you asivi and scrooch2005 for your help!
- asivi
-
1000+ posts
How to make a gun fire a bullet?
I'm glad if i've helped you.Now i'm going to delete the remix.
Greetings.
Greetings.
- brain39143
-
40 posts
How to make a gun fire a bullet?
I've found another glitch in the game, whenever I press space for the green tank a bullet comes out of the red tank
- asivi
-
1000+ posts
How to make a gun fire a bullet?
I've shared it again thanks I might need to use thishttps://scratch.mit.edu/projects/97772350/
Greets.
Last edited by asivi (Feb. 13, 2016 20:40:46)
- brain39143
-
40 posts
How to make a gun fire a bullet?
I've shared it again thanks I might need to use thishttps://scratch.mit.edu/projects/97772350/
Greets.
- asivi
-
1000+ posts
How to make a gun fire a bullet?
I've made some changes, take a look. If you don't need the bullet for other sprite than the tank1 then the bulletID for the clone isn't necessary.I've shared it again thanks I might need to use thishttps://scratch.mit.edu/projects/97772350/
Greets.
Greets.
- brain39143
-
40 posts
How to make a gun fire a bullet?
No, I'm trying to make one CPU and one player but I can't make a CPUI've made some changes, take a look. If you don't need the bullet for other sprite than the tank1 then the bulletID for the clone isn't necessary.I've shared it again thanks I might need to use thishttps://scratch.mit.edu/projects/97772350/
Greets.
Greets.
- deck26
-
1000+ posts
How to make a gun fire a bullet?
Why not? It just needs to fire automatically rather than react to a key press. Perhaps when the player's tank is within a certain distance it should point it's turret at the tank and fire repeatedly with a delay.No, I'm trying to make one CPU and one player but I can't make a CPUI've made some changes, take a look. If you don't need the bullet for other sprite than the tank1 then the bulletID for the clone isn't necessary.I've shared it again thanks I might need to use thishttps://scratch.mit.edu/projects/97772350/
Greets.
Greets.
- asivi
-
1000+ posts
How to make a gun fire a bullet?
Well, @brain39143 has created a topic for the CPU AI, https://scratch.mit.edu/discuss/topic/183276/ .
Regards to all forum.
Regards to all forum.
- jellyisawsome2
-
3 posts
How to make a gun fire a bullet?
You can try this link https://scratch.mit.edu/projects/1478660/
Last edited by jellyisawsome2 (April 14, 2018 23:03:27)
- lwell72
-
100+ posts
How to make a gun fire a bullet?
When ur in your project there is a little arrow it the bottom middle of your screen. You can put stuff in it and Transfer scrips, music and sprites from project to project. If this diner help look at a video on how to find it. I need help! I heard that when you have an account on Scratch that you have a book bag. How do I use it? Please reply ASAP!!!
- Discussion Forums
- » Help with Scripts
-
» How to make a gun fire a bullet?