Discuss Scratch

Jackaroo12
New Scratcher
6 posts

Gun Shooting Help

Hey guys, in my game when I shoot with my guns like the Mark2, the bullet stays there for a few seconds if I move around. Please help - https://scratch.mit.edu/projects/149865051/#editor
amylaser
Scratcher
500+ posts

Gun Shooting Help

Can you explain your problem a bit more? Maybe tell us which sprite is glitching?

Also, instead of having so many enemy sprites, try using the “clone” block instead – it's way more efficient.
Jackaroo12
New Scratcher
6 posts

Gun Shooting Help

amylaser wrote:

Can you explain your problem a bit more? Maybe tell us which sprite is glitching?

Also, instead of having so many enemy sprites, try using the “clone” block instead – it's way more efficient.
Hey thanks for the reply. The reason I didn't use cloning was because I needed different spawn locations and the health wasn't working with clones, which could've been fixed but hey it was easier just to duplicate haha.. Anyway back to the problem - I need the bullet to disappear faster after shooting, cause with some guns the bullet will stay there for about 1 second before leaving. When you've got the speed boost or just moving away from the bullet very fast, it looks very weird, I tried changing the times but it didn't look like it did anything. Maybe I was changing the wrong times?
amylaser
Scratcher
500+ posts

Gun Shooting Help

About clones: you can give them different spawn points and health by using local variables. You do this by selecting the “for this sprite only” option when creating your variables.

About the bullet problem: Under the “if gun = Mark3” script block, you have an isolated “wait 0.2 secs” block that seems out-of-place. Was that intentional or…? And yes, it's probably because of all the “wait” blocks that you're experiencing your problem. If you want the image of the bullet paths to linger (but not stay in the same place like they are now) then you'll have to put them in a script that's separate from the ones that control their position. I.e. don't put the “go to Player” and “wait” blocks inside the same forever loop.

Hope that helped clear things up a bit ^.^
Jackaroo12
New Scratcher
6 posts

Gun Shooting Help

amylaser wrote:

About clones: you can give them different spawn points and health by using local variables. You do this by selecting the “for this sprite only” option when creating your variables.

About the bullet problem: Under the “if gun = Mark3” script block, you have an isolated “wait 0.2 secs” block that seems out-of-place. Was that intentional or…? And yes, it's probably because of all the “wait” blocks that you're experiencing your problem. If you want the image of the bullet paths to linger (but not stay in the same place like they are now) then you'll have to put them in a script that's separate from the ones that control their position. I.e. don't put the “go to Player” and “wait” blocks inside the same forever loop.

Hope that helped clear things up a bit ^.^
Hey, sorry for the late reply, yeah I'll put your suggestions to the test, thanks.

Powered by DjangoBB