I want a normal gun!

Hi guys can somebody change the code so that i don't shot while i'm pressinf fire 1 only if i press i have to press again for shooting the code is here:


Looks like your code is set up to call a firing function at a certain rate of time. If I understand you correctly, you want it to be semi-automatic; one shot per click.

Consider using this condition:

if (Input.GetMouseButtonDown(0))

This will be true the first frame the left mouse button (button 0) has been clicked down. If you set your script up to call the fire function when that is true and only when that is true, you should only see it fire once per click.


In fact, I would even say your script is already set up to fire automatic or semi-automatic. Just call the FireOneShot() function instead of the Fire() function.

please help me!