On Sprite 6:
When Flag Clicked:
Set ammo to 100.
Forever
hide
go to character
point towards mouse pointer
If mouse down?
If ammo > 0
Change ammo by -1
Show
Repeat until touching edge
Move 40 steps.
You can change the 100 to whatever number you want for how much ammo you want to be available.
Offline
Put the shooting script in one of these:
[blocks]<forever>[/blocks]
[blocks]<if><( <{ Ammo }> <>> 100 )>[/blocks]
[blocks]<{ Do your shooting script }>[/blocks]
[blocks]<end>[/blocks]
Offline
And I really like how you aren't just saying "How do I make this game?" but instead asking advice on different parts and pieces of your project
Offline
keroro645 wrote:
I need help with variables.In this Shooter i want it so that when the ammo variable reaches 0 you cant shoot no more.
In case you still need help on variables, I explain a little about them in my online tutorials. Just click on the Scratch link in my signature.
Offline