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

Issue with custom sounds not playing (Slade)

Question

I've had this issue for awhile now, and I still haven't been able to find anything. I've been experimenting with making different things in Slade, but I've never been able to have custom sounds that work. I made a SNDINFO lump, and assigned names to my sounds in there, and I made sure the files themselves were converted to Doom format. I've tried doing this a few times with different types of actors, for example, I made a weapon that is supposed to make a sound when firing its projectile. I used A_PlaySound on the weapon's firing state, and when that didn't work I tried assigning the sound to the projectiles See state, and made sure everything was typed correctly. Whenever I run my file to test it, I always hear nothing where there's supposed to be a sound.

 

I'm sure the problem is something simple, but I've been trying for awhile and I don't know what I'm doing wrong. I found that replacing an already-existing sound file makes it work, but I don't want to just replace sounds.

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0

I get warnings when I use A_PlaySound(). Maybe using A_StartSound() would work. 

https://zdoom.org/wiki/A_StartSound

Did you double check that the drop down menu at the top of the screen when you're looking at your SNDINFO lump has the right script language selected? 

Are you using gzdoom or another platform that supports SNDINFO?

Share this post


Link to post
  • 0

Hey, I didn't see this earlier. So I did make sure that the text language (I think that's what you're talking about with the top-of-the-screen script language) is set to ZDoom SndInfo. The platform I'm using is ZDoom. Also, I tried A_StartSound and even though the text color becomes dark-yellow like the other functions in DECORATE, when I run it, it says that A_StartSound is an invalid state parameter. 

 

Thanks for helping me out, and sorry for not seeing it earlier. 

Share this post


Link to post
  • 0

No worries. If your SNDINFO entry was

Badnoise              fart

The state frame in decorate should look something like

TNT1 A 1 A_StartSound("Badnoise")

Or in zscript

TNT1 A 1 A_StartSound("Badnoise");

 

You can put an actual sprite name and different tic numbers in there. The sound lump should be called fart if it looks that way in SNDINFO. 

I wonder, because I always use gzdoom because zdoom looks distorted when you look up or down.

There's more you can do with it if you want. 

https://zdoom.org/wiki/A_StartSound

 

Still, I don't really think A_PlaySound() was the problem, it just always prompts a warning message when I use it but it still works. 

 

You said that replacing the existing sounds works, but defining new ones doesn't. Perhaps the relationship between the two names in SNDINFO and the tag in the code are backwards? If you post your SNDINFO and your code here we could take a look at it. 

To avoid that sort of shit I always make the names the same, so the sounds I define always would read:

Fart              Fart

Share this post


Link to post
  • 0

I don't know if this helps, but when I tried A_StartSound, the game doesn't even decide to run, it just gives me an error. This has happened for a few other functions too, for some reason. I don't remember which specifically, but I know I've tried to use a couple of functions that I read from the ZDoom Wiki, and they ended up doing the same thing as A_StartSound did.

 

Anyways, I just used A_PlaySound and first tried to switch my SNDINFO entries to see if I maybe did get the order wrong. Nothing happened, so I tried your naming method and it only kind of worked, because one of my sounds played and the other didn't. I'm using two sounds on a weapon, one for picking it up and one for firing. The firing sound played as the pickup sound (despite having the pickup sound's name), and the TNT1 frame that calls the firing sound does nothing at all (even though it has the actual name of the firing sound). This is really confusing, I don't know why the sound names are switched all of a sudden. I tried to drag the file I'm doing this all on into here, but it wouldn't let me because the file type isn't allowed. So I'll copy and paste segments from DECORATE and SNDINFO onto here.

 

In SNDINFO:

 

"LSRGET" = LSRGET 
"LSRFIRE" = LSRFIRE 

 

(I also made sure the audio lumps themselves are both named correctly and in Doom format.)

 

My weapon in DECORATE:

 

ACTOR Lasergun: Weapon Replaces Chainsaw {
    Weapon.SelectionOrder 200
    Weapon.AmmoUse 2
    Weapon.AmmoGive 60
    Weapon.AmmoType "Cell" 
    
    Inventory.PickupSound "LSRGET"
    Inventory.PickupMessage "Picked up a Laser Gun!"
    
    States{
        Spawn:
        LASR A -1
        stop
        
        Select:
        LGUN A 1 A_Raise
        Loop
        
        Deselect:
        LGUN A 1 A_Lower
        Loop
        
        Ready:
        LGUN A 1 A_WeaponReady
        Loop
        
        Fire:
        LGUN B 7
        Goto LaserFire
        
        LaserFire:
        TNT1 A 0 A_PlaySound("LSRFIRE")
        TNT1 A 0 A_Recoil(2)
        TNT1 A 4 A_FireCustomMissile("Laser",2,1,0,-4)
        LGUN B 6
        LGUN D 0 A_Refire("LaserFire")
        Goto RaiseGun
        
        RaiseGun:
        LGUN D 6
        Goto Ready
    }
}

 

And I'll also add a screenshot of all my lumps in the file, to make sure that the problem isn't simply incorrect placement. 

 

image.png

Share this post


Link to post
  • 0

Alright, I think your sound info file is the culprit. Here is a screenshot of part of my SNDINFO

1ZTdHZR.jpg

 

These sounds function in my wad, so I think that your quotation marks and equals signs are probably mucking up the works somehow. I think I might have seen something like what you are writing in a mod somewhere but I couldn't make it work piecemeal. I think you should download some monsters and weapons from https://www.realm667.com/en/repository-18489/armory-mainmenu-157-97317/doom-style-mainmenu-158-94349  https://www.realm667.com/en/repository-18489/beastiary-mainmenu-136-69621/doom-style-mainmenu-105-73113 and play with them in SLADE. Most of the custom creatures and weapons have custom sounds and you'll see how the script and files relate to one another. I know its frustrating to be banging your head against the wall like this but you're not far off. Let me know how it goes.

Share this post


Link to post
  • 0

Alright, so I was in the middle of observing a few downloads that had a SNDINFO lump, when I got the idea to try your naming style again (in my own wad), which didn't work before. Maybe I didn't save last time I did it, but for some reason when I did it this time it works perfectly. Both sounds play when they're supposed to, without being swapped, and there are seemingly no issues at all.  I don't wanna say that everything is perfectly fine now, because I don't know what I just did that was different from my last attempt.

 

For now, thanks for helping me out with this issue.

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
×