keroro645 wrote:
I need help on the variable that uses ammo.I want it so if i run out ammo i cant shoot,and if i find ammunition i can use the gun again.
This is really simple.
1. Create a variable called Ammunition or ammo or whatever you want to call it.
2. Have a sprite that is the ammo.
3. When <player> is touching ammo set ammunition to 100. Then for the ammo sprite, if touching player hide.
That'll fix your reloading issue, but for the "not being able to shoot thing" try this:
This will make it so you have an on/off thing for the shooting.
Create a new variable called (shooting?)
If <shooting?> = 1 then if space key pressed broadcast bullet
So now you can only shoot when shooting? = 1
Now we will combine the variables.
If ammo = 0 set shooting to zero.
Hope that helped. If you need me to explain it a little better or organize it better, just ask.
If you would prefer, you can download a project of mine that has the same ideas. Its about getting fuel for your jetpack, pretty much the same thing as reloading. http://scratch.mit.edu/projects/Fireicedude/154879
Last edited by Fireicedude (2008-07-15 10:54:50)
Offline
keroro645 wrote:
This really helped.
Thanks
Welcome!
Offline
Offline
keroro645 wrote:
Wow! It turned out really nice. I like how its set up.
Offline
What about hitting a single target?
Offline
stuntman021 wrote:
What about hitting a single target?
You need help with that? or are you suggesting that?
Offline