So I have a button that allows a player to fire a bullet, however I don't want the player to be able to mash the button and shoot an endless stream of bullets. What can I do to slow fire rate/spawning of a bullet?
Develop games in your browser. Powerful, performant & highly capable.
I suggest this small tutorial
Create a Global variable and call it "Can_Shoot". Use 0 for false and 1 for true and set it to 1.
Create a dual condition with the following events:
Button Is Pressed > Gun > Set Can_Shoot to 0
Can_Shoot =1 > Spawn Bullet
___________________ >System Wait 0.2
___________________ > Set Can_Shoot to 1
Bullets can only fire when Set Can_Shoot =1 and use System Wait to dictate the amount of time before it can fire again
Thanks! That did the trick!