Better toggle between a "ready to fire" and a "reloading projectile" state.
This way the player will not be able to fire faster by fast releasing.
When ready the weapon can fire the projectile on request. At the same time it will start reloading a projectile (semi-automatic weapon).
When reloading a projectile we just wait a certain time (as it is not a real weapon). Here you could for example count the available bullets.
How does that work?
It starts with state "ready". That means the weapon is loaded and
ready to fire.
- When the player request fire (by pressing a button) the projectile
gets added (fired) and the weapon switches to reloading state.
Within state "reloading projectile" any fire request will get
- When loading is done, the weapon switched to "ready".
The player can fire again.
A) The above setting let the weapon work in "full automatic mode". This means when the player still holds the fire button, the next "fire" will be executed. To get a semi-automatic fire mode, you can disable the [Level] parameter. This means the user has to release the button and press it again.