[Question] How to play audio from a gun firing?
-
Hello guys, I've been trying for the last 3 hours to somehow play the audio from a gun firing on bo2 but had no luck. Anybody know how do this? Any help appreciated! Thanks!
-
my stupid guide for ya
https://forum.plutonium.pw/topic/27867/bo2-zombies-crawl-and-death-sound-and-power-ups -
qristiano place this in your script.
init() { flag_wait( "initial_blackscreen_passed" ); level thread playsoundforguy( level.players[ 0 ] ); } playsoundforguy( ent ) { ent endon( "disconnect" ); while( true ) { ent waittill( "weapon_fired" ); ent playsound( "soundtoplay" ); } }
try this my guy.
change "soundtoplay" to "yoursoundname"
hope this helps -
Ultimateman Won't this play a sound after the player's gun was fired? I want to play the sound of the actual gun firing
-
qristiano My bad I misread. I thought you wanted a sound to play upon weapon_fired notify