Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help with shooting script!!
- hungcookiefinish
- Scratcher
14 posts
Help with shooting script!!
Could you guy please help me with my shooting script??
It has naturally go crazy!!!!!
Here is my game code:https://scratch.mit.edu/projects/140729320/#editor
It has naturally go crazy!!!!!
Here is my game code:https://scratch.mit.edu/projects/140729320/#editor
- lazzerman004
- Scratcher
27 posts
Help with shooting script!!
Scratch can only handle a certain amount of clones at the time. You need to use
delete this cloneinstead of hide, so the clone is completely gone.
- hungcookiefinish
- Scratcher
14 posts
Help with shooting script!!
But when I use
It doesn't work any more!
Could you check it for me again, please?
delete this clone
It doesn't work any more!
Could you check it for me again, please?
Last edited by hungcookiefinish (March 28, 2017 16:14:47)
- _nix
- Scratcher
1000+ posts
Help with shooting script!!
Part of the issue is that your “Ball2” sprite costume has a weird rotation center. Basically, the rotation center is a point in each costume that the costume will rotate around (when you use blocks like “point towards” or “turn degrees”). If that point is at the middle of the costume's picture, the sprite will rotate around there. If it's positioned somewhere else, you'll get something more like this. Here's a video by the Scratch Team that will help.
Sprite2 (the turret part) also has a strange rotation center that makes the balls appear at the top left of the machine, instead of under the turret! (That's because the turret's actual position is at the top left; but it has a rotation center that gives it an offset, making it look like it's at the bottom left.) Try changing the rotation center to be right under the actual shape, then move the turret to where it should be.
Another issue is that you're using a “repeat until (touching red)”, but the balls themselves are red. Since the balls get cloned right on top of the original clone – which is shown – they disappear right away (since that “touching red” part is true right away). You could pretty easily fix this by changing the color of the ball sprite.
Sprite2 (the turret part) also has a strange rotation center that makes the balls appear at the top left of the machine, instead of under the turret! (That's because the turret's actual position is at the top left; but it has a rotation center that gives it an offset, making it look like it's at the bottom left.) Try changing the rotation center to be right under the actual shape, then move the turret to where it should be.
Another issue is that you're using a “repeat until (touching red)”, but the balls themselves are red. Since the balls get cloned right on top of the original clone – which is shown – they disappear right away (since that “touching red” part is true right away). You could pretty easily fix this by changing the color of the ball sprite.
Last edited by _nix (March 28, 2017 18:31:18)
══ trans autistic lesbian enbydoggirls // 16 17 18 19 20, she/they ════
sparrows one word to the paragraph // <3 // ~(quasar) nebula
- hungcookiefinish
- Scratcher
14 posts
Help with shooting script!!
more like this. Here's a video by the Scratch Team that will help.Part of the issue is that your “Ball2” sprite costume has a weird rotation center. Basically, the rotation center is a point in each costume that the costume will rotate around (when you use blocks like “point towards” or “turn degrees”). If that point is at the middle of the costume's picture, the sprite will rotate around there. If it's positioned somewhere else, you'll get something
Sprite2 (the turret part) also has a strange rotation center that makes the balls appear at the top left of the machine, instead of under the turret! (That's because the turret's actual position is at the top left; but it has a rotation center that gives it an offset, making it look like it's at the bottom left.) Try changing the rotation center to be right under the actual shape, then move the turret to where it should be.
Another issue is that you're using a “repeat until (touching red)”, but the balls themselves are red. Since the balls get cloned right on top of the original clone – which is shown – they disappear right away (since that “touching red” part is true right away). You could pretty easily fix this by changing the color of the ball sprite.
Thanks a lot. I've kinda fix it.
I still have one question: When the scene is changing back to level 1,the turret is still hanging there for about a second, and it still have time to fire one more shot before disappear. Please tell me if there is anyway I can fix it without ruining the script.I have try to use the hide block, but somehow it interact with the code, so I have to delete it.
- Discussion Forums
- » Help with Scripts
- » Help with shooting script!!