Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
siteod

Swap chaingun sound using dehacked

Question

Hello. The other day I attempted to change the chaingun's sound from pistol to the shotgun, so i could have the more meatier version like the chaingunner has, using a sndinfo file in a wad. While, that worked fine for gzdoom, I discovered that's only a zdoom/derivative feature and doesn't work for ports like prboom+, which I often use for demo playback. Is it possible to do the same thing using dehacked? I tried looking through whacked but couldn't find anything to swap sounds, but tbh i have 0 experience with it and have no idea what I'm doing. 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

With Dehacked, the sound a weapon makes is tied to the code pointer that is used for the weapon's attack. Unfortunately, the Pistol attack and the Chaingun attack are both hardwired to DSPISTOL, and there is no easy way to change the sound of one without affecting the other. I can certainly think of a couple of Seriously Hacky ways to do it, but they come with very noticeable side effects; the safest would be to simply replace DSPISTOL with a copy of DSSHOTGN, though this would also affect zombies.

Share this post


Link to post
  • 0

Ah, yeah I was afraid of that. I'd rather not get real wonky with trying to switch out, it's not that important to me. Still, I am a little relieved that I wasn't able to find anything in whacked because it just wasn't there, and not because I wasn't understanding it correctly.

Thanks for the reply!

Share this post


Link to post
  • 0

You can replace the light flash states with A_LoadShotgun2, A_OpenShotgun2, etc to replace the chaingun sound with DSDBLOAD, DSDBOPN, etc as demonstrated here: https://streamable.com/fg2mo

 

Of course you can edit the sound to something more appropriate, might make the super shotgun sound weird tho

Edited by unpleasantmarine

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×