Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Greeting Construct 2 users,
I have included codes in my Event Sheet that allows the player to shoot automatically while he or she is dragging the spaceship (the sprite that represents the player). But unfortunately, the spaceship is shooting too many laser rays at once. What kind of code and variable can I add to the current code in my event sheet, so the spaceship can shoot a reasonable number of laser rays? Here's a picture of the code in my event sheet:
in event 6, just add some time to ShootSpaceship.
if you want the spaceship to shoot 10 times a second, set ShootSpaceship to 0.1
for 5 times per second, set ShootSpaceship to 0.2
for 3 times per second, 0.33
twice a second, 0.5
Develop games in your browser. Powerful, performant & highly capable.
Thank you for the solution that you have suggested to me, it works!