Is there any way of detecting whether or not a playing is currently pressing the fire button? I'm trying to write a script where the player's ammo regenerates over a period of time, with a short delay after the last press of the fire button. This would stop ammo from regenerating continuously even when the player is constantly firing.
|