Skip to content
← Back to Community
how i do to not spam the shoot action with kaboom.js
Profile icon
alexortizjr

I am making a space invaders game on atom with the kaboom.js script

My problem came up when I do the shooting action, I can spam it and I don't want that ...
some advice to not be able to spam to the shoot action?

help

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
alexortizjr
Comments
hotnewtop
Profile icon
Coder100

You could set a property in the user called reload, and each time they shoot, the reload is set to like 10, and on action, you can decrease the value until it is 0, and only if reload is 0 can you shoot.

Profile icon
alexortizjr

@Coder100 thanks: D its my first web game and im kinda lost with this things

Profile icon
Coder100

np!
mark as correct answer? @alexortizjr