Why is it when I hold down a button to perform a action in my games it "spams" the action for as long as I hold the button?
id: 751570
category: Help with Scripts
posts: 3
Apr 1, 2024 03:00:07
Why is it when I hold down a button to perform a action in my games it "spams" the action for as long as I hold the button?
view on scratch
view on legacy ocular
Fa737
loading
I'm making a shooter type game and when I press SPACE to shoot it spams bullets. How do I make it so when I press the button to shoot it shoots once?
Heres the link to my game: https://scratch.mit.edu/projects/967818050/
Heres the link to my game: https://scratch.mit.edu/projects/967818050/
Apr 1, 2024 04:03:19
Why is it when I hold down a button to perform a action in my games it "spams" the action for as long as I hold the button?
view on scratch
view on legacy ocular
MrKingofScratch
loading
Please don't post the same question twice. Instead, you can “bump” your thread once a day (post anything, usually the word bump to bring it to the top of the forum pages). Only do this once a day, or it could be considered spamming.
Anyways, I answered your question on your other thread with the same question:
https://scratch.mit.edu/discuss/post/7895239/
Anyways, I answered your question on your other thread with the same question:
https://scratch.mit.edu/discuss/post/7895239/
Apr 1, 2024 11:41:25
Why is it when I hold down a button to perform a action in my games it "spams" the action for as long as I hold the button?
view on scratch
view on legacy ocular
-HamSlider-
loading
Try this
Btw the sound is representing the shooting
when green flag clicked
forever
if <mouse down?> then
play sound [ v]
wait until <not <mouse down?>>
end
end
Btw the sound is representing the shooting