Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Question] How to play audio from a gun firing?

[Question] How to play audio from a gun firing?

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
5 Posts 3 Posters 254 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    qristiano
    wrote on Jul 2, 2024, 11:26 PM last edited by
    #1

    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!

    undefined 1 Reply Last reply Jul 6, 2024, 5:14 AM
    1
    • undefined Offline
      undefined Offline
      GhostRider0125
      wrote on Jul 3, 2024, 7:57 AM last edited by
      #2

      my stupid guide for ya😆
      https://forum.plutonium.pw/topic/27867/bo2-zombies-crawl-and-death-sound-and-power-ups

      1 Reply Last reply
      0
      • undefined Offline
        undefined Offline
        Ultimateman
        replied to qristiano on Jul 6, 2024, 5:14 AM last edited by
        #3

        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 👍

        undefined 1 Reply Last reply Jul 6, 2024, 10:18 AM
        0
        • undefined Offline
          undefined Offline
          qristiano
          replied to Ultimateman on Jul 6, 2024, 10:18 AM last edited by
          #4

          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

          undefined 1 Reply Last reply Jul 10, 2024, 7:56 AM
          0
          • undefined Offline
            undefined Offline
            Ultimateman
            replied to qristiano on Jul 10, 2024, 7:56 AM last edited by
            #5

            qristiano My bad I misread. I thought you wanted a sound to play upon weapon_fired notify

            1 Reply Last reply
            0

            4/5

            Jul 6, 2024, 10:18 AM

            • Login

            • Don't have an account? Register

            • Login or register to search.
            1 / 1
            • First post
              4/5
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Donate