• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED New user - DnD Space Rocks Part 3: too many bullets coming out at the same time

D

dengdaizhea

Guest
Hello,

I just watched part 3 and I'm having problems with my bullets. Here's an example:


I'm only hitting the space key once yet so many bullets came out. It doesn't show in this video but if the ship spins, you could see the bullets separating from each other. I would like to know how to fix this.

Thank you so much for clicking into my question and helping me!
 

FrostyCat

Redemption Seeker
Use the Keyboard Pressed event for shooting instead of the Keyboard Down event.
The Manual entry on events said:
For the general keyboard event, it is triggered continuously, every step, for as long as the selected key is pressed down.

...

The Press and Release events for the keyboard are almost exactly the same as the regular keyboard event, except that instead of being triggered continuously, they are triggered once only. When the keyboard first registers that a key has been pressed it will generate a Keyboard Pressed event (as well as a regular Keyboard event), and the first time after that where a key is no longer being detected as pressed it will trigger a single Keyboard Release event.
 
Top