• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Noise Gun

Emblin

Refugee
I'd love to see a simple, craftable gun that doesn't shoot projectiles but gives off an extreme amount of noise when it's fired. It would be similar to the Anti-Gadoid gun from Dying Light, such that it's purpose is to draw in infected from a large area.

Looking forward to your replies :smile-new:

 
I believe the amount of noise a gun makes is determined in the xmls. Can't remember exactly what the specific name of the property is, but you can modify the range of the noise and its effect on the heat map, I believe.

 
You'll want to create a new pistol by copying and renaming the pistol in items.xml. You'll also want to create a custom sound that mimics the Pistol_Fire sound found in the sound.xml.

Code:
<SoundDataNode name="Pistol_Fire"> <AudioSource name="Sounds/AudioSource_WeaponFire"/> <NetworkAudioSource name="Sounds/AudioSource_WeaponFire_Network"/>
<Noise ID="0" volume="52" time="2" muffled_when_crouched="0.8" heat_map_strength="[color="#FF0000"]0.65[/color]" heat_map_time="[color="#FF0000"]180[/color]"/>
<distantfadestart name="[color="#FF0000"]10[/color]"/><distantfadeend name="[color="#FF0000"]20[/color]"/>
<AudioClip ClipName="Sounds/Weapons/Ranged/Pistol/Pistol_Fire1" DistantClip="Sounds/Weapons/Ranged/Pistol/pistol_d_fire1" DistantSource="Sounds/AudioSource_WeaponFire"/>
<AudioClip ClipName="Sounds/Weapons/Ranged/Pistol/Pistol_Fire2" DistantClip="Sounds/Weapons/Ranged/Pistol/pistol_d_fire2" DistantSource="Sounds/AudioSource_WeaponFire"/>
<AudioClip ClipName="Sounds/Weapons/Ranged/Pistol/Pistol_Fire3" DistantClip="Sounds/Weapons/Ranged/Pistol/pistol_d_fire3" DistantSource="Sounds/AudioSource_WeaponFire"/>
<AudioClip ClipName="Sounds/Weapons/Ranged/Pistol/Pistol_Fire4" DistantClip="Sounds/Weapons/Ranged/Pistol/pistol_d_fire4" DistantSource="Sounds/AudioSource_WeaponFire"/>
<LocalCrouchVolumeScale value="1"/> <CrouchNoiseScale value="1"/> <NoiseScale value="1"/> <MaxVoices value="30"/> <MaxVoicesPerEntity value="10"/> <MaxRepeatRate value="0.001"/> </SoundDataNode>
You'll want to adjust the red fields above to add more heat for longer and at much higher range.

 
Back
Top