Custom weapon has no sound

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Custom weapon has no sound

Post by vAethor »

Running the risk of angering the mods for posting another topic right after the first. So if I am breaking any etiquette let me know and maybe merge the two custom weapon issues threads I posted.

I fixed the previous issue of the gun not even showing up, and now I have added a custom projectile that replaces the vanilla rocket. But the problem is, it is completely silent.

Code: Select all

Actor GaussRocket : Rocket replaces Rocket
{
	SeeSound "GAUSS1"
}
I have my custom sound in the Sounds directory in my PK3. But when I fire my custom gun, no sound at all.

I tried commenting out the SeeSound line of code and adding PlaySound in the fire state for the actual weapon, with the custom sound I wanted, but that also didn't work: It just played the vanilla rocket sound instead of my sound.

I also tried renaming the sound DSGSS1, also no luck.

I am really excited to be finally making my own weapons. I feel like I am almost there.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Custom weapon has no sound

Post by wildweasel »

Did you define the sound in a SNDINFO lump? In this case it'd be trivial to define, just add a single line to SNDINFO like this:

Code: Select all

weapons/gauss GAUSS1
and then use the SNDINFO name in SeeSound:

Code: Select all

SeeSound "weapons/gauss"
vAethor
Posts: 93
Joined: Wed May 10, 2017 4:10 pm

Re: Custom weapon has no sound

Post by vAethor »

I actually was reading up on SNDINFO while I waited for a reply here. I honestly am glad I posted here, and I'm glad you mentioned SNDINFO, because it was just right outside my ability to understand myself.

But now I got it working, thanks.

Hey, before I say it's all solved I'd like to know if I should simply use one forum thread to answer all my custom weapons-related questions, because it doesn't sit right with me that I keep posting so much just to help creating one weapon. But if there is not a problem, I will keep going.
Locked

Return to “Editing (Archive)”