Discuss Scratch

JOEonPConSCRATCH
New to Scratch
7 posts

HELP!

I need help on my mg42 simulator. Can someone tell me how when the shots fired reaches 100 you have to reload and also when it is reloading the gun can still shoot and i was wondering if anyone could help me with that too. ( I mean can someone tell me when i reload the bullets wont fire) THANKS!!
dvd4
Scratcher
100+ posts

HELP!

(this is MY opinion,not saying it's the “truth” but it's just what I think it “true”(so i my be wrong) but it was done in good faith)

this seems more like a problem with your project,not with scratch itself,so i think maybe it's the wrong place…


YOU WILL REMEMBER MY NAME
Sonickyle
Scratcher
1000+ posts

HELP!

Wrong forum.

Off to “Help with Scripts” with ye.

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
RUBIXS
New to Scratch
60 posts

HELP!

JOEonPConSCRATCH wrote:

I need help on my mg42 simulator. Can someone tell me how when the shots fired reaches 100 you have to reload and also when it is reloading the gun can still shoot and i was wondering if anyone could help me with that too. ( I mean can someone tell me when i reload the bullets wont fire) THANKS!!

When flag clicked
Forever
set reloaded to=0
set Ammo to=100
repeat until Ammo=0
Change ammo by -1 (firing animation)
Wait until variable reloaded=1

When flag clicked
forever
if space key pressed
set variable reloaded to=1


The reloaded variable is basically telling it to fire until it runs out of ammo and then it will wait until the space key is pressed to start firing again.
Hope this helps

Last edited by RUBIXS (June 14, 2013 18:12:24)

JOEonPConSCRATCH
New to Scratch
7 posts

HELP!

RUBIXS wrote:

JOEonPConSCRATCH wrote:

I need help on my mg42 simulator. Can someone tell me how when the shots fired reaches 100 you have to reload and also when it is reloading the gun can still shoot and i was wondering if anyone could help me with that too. ( I mean can someone tell me when i reload the bullets wont fire) THANKS!!

When flag clicked
Forever
set reloaded to=0
set Ammo to=100
repeat until Ammo=0
Change ammo by -1 (firing animation)
Wait until variable reloaded=1

When flag clicked
forever
if space key pressed
set variable reloaded to=1

THANKS!


The reloaded variable is basically telling it to fire until it runs out of ammo and then it will wait until the space key is pressed to start firing again.
Hope this helps
JOEonPConSCRATCH
New to Scratch
7 posts

HELP!

thanks!

Powered by DjangoBB