The title basically says it, but I'm making an FPS game and would like to know how to disable audio for a specific time, (for example, 3 seconds.) My FPS character can press the reload key (R) as many times as they want while it is reloading and the reload sound will play, so I need to find a way around this. Can anyone help with disabling audio temporarily (until the reload time passes) or some other way around this?
Side notes:
- The reload function is called by pressing R
- Once the reload is complete, the player can't reload again until either the bullets are less than a full clip, or they manually reload by pressing the R key.
(So basically the question is how can I play the audio only one time while it is reloading?)
Thanks in advance!
↧