Projectile won't always play death sound

Wed Jan 05, 2022 7:01 am

A projectile i made in decorate will sometimes fail to play its death sound, wich is defined in sndinfo, i tried using A_PlaySound and A_StartSound instead, but the result is always the same, all other sounds play fine. I even attempted to change the sound file with a different one but same thing happened, why could this be.


My weapon code
Spoiler:


My weapon in sndinfo
Spoiler:

Re: Projectile won't always play death sound

Wed Jan 05, 2022 11:26 am

I'm a bit confused, unless i misread something, none of your projectiles uses A_PlaySound or A_StartSound, and if the problem is the projectile, you could use A_PlaySound or A_StartSound in the projectile instead of using DeathSound, since yeah, it can be a bit finnicky.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 12:47 pm

"sometimes fail to play its death sound" is not very specific. If this is happening when you fire a lot of projectiles in short succession and they are hitting a similar target, then it could be that the sound is reaching its $limit value - which can be increased in SNDINFO.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 1:20 pm

which can be increased in SNDINFO.


Question, is that necessary? A_StartSound allows you to overlap a sound in channel, which takes away the point of increasing the limit of, y'know, sound queing and stuff.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 1:31 pm

Honestly, I'm not sure. So I'll go for - maybe not? ;)

Either way, I'm just throwing out an idea that is a common problem and given that OP says A_StartSound was tried, but I don't see it in the code so I don't know what parameters it was used with.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 2:14 pm

Yeah, me neither, i hope OP can point this too, since there is quite a hefty amount of code here to look.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 6:28 pm

XASSASSINX wrote:I'm a bit confused, unless i misread something, none of your projectiles uses A_PlaySound or A_StartSound, and if the problem is the projectile, you could use A_PlaySound or A_StartSound in the projectile instead of using DeathSound, since yeah, it can be a bit finnicky.


I tried using A_PlaySound and then A_StartSound but since they both had the same result as DeathSound i changed it back to that instead
Last edited by nekostuffing on Wed Jan 05, 2022 6:52 pm, edited 1 time in total.

Re: Projectile won't always play death sound

Wed Jan 05, 2022 6:39 pm

Enjay wrote:"sometimes fail to play its death sound" is not very specific. If this is happening when you fire a lot of projectiles in short succession and they are hitting a similar target, then it could be that the sound is reaching its $limit value - which can be increased in SNDINFO.


Yeah thats basically it , i cant find any examples of this , but based on the wiki i think i should do it like this, is this correct?

Code:
$limit weapons/magshexp   MAGSHEX <100> [40]

Re: Projectile won't always play death sound

Thu Jan 06, 2022 1:58 am

nekostuffing wrote:is this correct?

Not quite. It should be like this:

Code:
$limit weapons/magshexp 100 40

The < > means the parameter is required, while [ ] means it's optional; you can specify it you want, or leave it out and the engine will use the default value.

Re: Projectile won't always play death sound

Thu Jan 06, 2022 3:34 am

Thanks a lot going to test this right away

(EDIT) Works like a charm.

Re: Projectile won't always play death sound

Mon Jan 10, 2022 10:06 am

XASSASSINX wrote:
which can be increased in SNDINFO.


Question, is that necessary? A_StartSound allows you to overlap a sound in channel, which takes away the point of increasing the limit of, y'know, sound queing and stuff.


Just for clarity—yes, It is. A_StartSound allows you to overlap a sound within a specific actor and their channels. $limit allows to control the limit on the total number of instances of this sound played in the game, which is different.