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
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
Hello everyone, I am creating an action game in which the player can shoot by left-clicking the mouse. Only, I ha spams the left mouse button the game becomes too easy.
Is there a way to prevent the player from shooting repeatedly ?
You'll want to set a timer variable.
Something like this:
on left click:
if timer > 0.5:
--> shoot bullet
--> set timer to 0
--> add dt to timer
You can change the '0.5' to change the possible rate of fire. You can also change 'on left click' to 'left button down' to allow them to hold the mouse button down to keep firing.
Develop games in your browser. Powerful, performant & highly capable.
Thanks Sqiddster for awnsering this fast !