Hi I have made a project with a tank that shoots when you press f. I want to make the tank shoot by pressing the mouse which is used to aim. I have tried this before by broadcasting but it was too slow. Plz can someone help? Here is the link to the project: (copy and paste into the address bar) http://scratch.mit.edu/projects/iaoumeur/2932591
Offline
Instead of using this in your firing script:
when [f v] key pressed firing scripts
when gf clicked forever if (mouse down?) firing scripts end
Offline
iaoumeur wrote:
Thank you soooo much! It's fixed now.
Your welcome! And I wish you good luck on whatever else you'll be doing with it!
Offline
i was wondering, how do i make the barrel of the tank to point on the mouse, yet it stays on the tank body and moves with the boddy as well.
Offline
Da_Tr0LL1337 wrote:
i was wondering, how do i make the barrel of the tank to point on the mouse, yet it stays on the tank body and moves with the boddy as well.
I would suggest making the tank and barrel two separate sprites. Put the "center" of the tank sprite's costume where the barrel should go, and the center of the barrel sprite's costume in the part that should go where the tank's center is. Did that make sense?
Then, use the following script in the barrel:
when gf clicked forever go to [tank v]Then it will stay with the tank.
Offline