Hi all, I’m pretty new to Unity and coding in general and am having problems that are probably easy to solve. I’ve got a spaceship with a missile launcher attached that fires with a mouse click. I want to be able to hold the mouse down and have a missile fire from the launcher then wait for reload period before firing again. The way I have it set up currently, if the user holds down the mouse button it works fine but everytime the user clicks the mouse it will fire a missile. So by rapidly clicking the mouse the player can fire as many missiles as they want without waiting for them to reload.
Any help would be appreciated.
You should check out the unity first person shooter example project which features very basic gun scripts that fit your desired description. Sorry I can’t provide a link I’m not on a desktop, hope this helps.