Help adding a pistol sound?

Started by 31njas, December 18, 2016, 05:33:03 PM

Previous topic - Next topic

31njas

Hey everyone.

So, I'm trying to add a sound to a gun in the game. I've got everything else right (well, still need to make the model) but yeah.

I've added everything obvious, but for some reason there's no sound when the gun fires, except the one that happens after it fires.

Code for the several sound files below.

Weapon def:
<verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<projectileDef>Bullet_Blaster</projectileDef>
<warmupTicks>54</warmupTicks>
<range>24</range>
<soundCast>DL44</soundCast>
<soundCastTail>GunTail_Light</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>


SoundDef for that gun:
  <SoundDef>
    <defName>DL44</defName> 
    <eventNames /> 
    <maxSimultaneous>1</maxSimultaneous> 
    <subSounds>
      <li>
        <grains>
          <li Class="AudioGrain_Folder">
            <clipFolderPath>DL44</clipFolderPath>
          </li>
        </grains>     
        <volumeRange>
          <min>61.76471</min>       
          <max>61.76471</max>
        </volumeRange>     
        <sustainLoop>False</sustainLoop>
      </li>
    </subSounds>
  </SoundDef>


I've also got several folders structured like this
<mod folder>/Sounds/DL44/DL44.ogg

Thanks for reading!