Jump to content

Make players weapons play sound at random?


Recommended Posts

You'll need to make a SNDINFO lump in which you define a new version of "weapons/shotgf" sound that is used by the shotgun when it fires. To make it alternate between any number of randomly chosen sounds, you can use the following structure:

weapons/shotgf1				NEWSOUND1
weapons/shotgf2				NEWSOUND2
weapons/shotgf3				NEWSOUND3

$random weapons/shotgf { weapons/shotgf1 weapons/shotgf2 weapons/shotgf3 }

Where NEWSOUNDX are your sound lump names.

Share this post


Link to post
  • 3 weeks later...

 

On 5/20/2021 at 2:21 AM, Aurelius said:

You'll need to make a SNDINFO lump in which you define a new version of "weapons/shotgf" sound that is used by the shotgun when it fires. To make it alternate between any number of randomly chosen sounds, you can use the following structure:


weapons/shotgf1				NEWSOUND1
weapons/shotgf2				NEWSOUND2
weapons/shotgf3				NEWSOUND3

$random weapons/shotgf { weapons/shotgf1 weapons/shotgf2 weapons/shotgf3 }

Where NEWSOUNDX are your sound lump names.

What are the other "Firing" definitions? I want to make this apply to all of the other weapons. And is there a way to randomize the players hurt and death sounds?

Share this post


Link to post

Any sound lump can be randomized using the above structure. You can find the different names from here, including weapon, player pain and death sounds. It's from 6 years ago, but I don't think any of that stuff has really changed, so you should be good.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...