Jump to content
  • 0

how does the A_playsound work?


monkeymaster69

Question

still me soo ive been trying adding a custom sound for the rifle that replaces the ssg but idk how it works i tried checking the doom wiki but still doesnt do the sound of the bang how do i fix it?333842282_Screenshot2024-02-16161903.png.712beb1371ad43501586bbb39419aaca.png

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

So, it's like this, right?

A_PlaySound ("Weapons/RifleShot", CHAN_WEAPON, 0.7, False, True, 10)

 

This is how it looks like on the Wiki

A_PlaySound [(sound whattoplay [, int slot [, double volume [, bool looping [, double attenuation [, bool local [, double pitch]]]]]])]

 

I think it's because you put "True" as the value for Attenuation, which is a double variable (purely numerical). Also, instead of numbers, you can put Constants, which are on the wiki. I don't use that value a lot, so I set it to the default constant (ATTN_NORM).

 

Kinda the same for local, which is a bool variable (True/False), but you put 10 (which idrk if it works, because I remember bools working with 0 and 1). 

 

Maybe you switched attenuation and local up? Try either swapping the values or removing them altogether, so the engine uses the default ones.

 

Btw, is there a specific reason you're sticking to A_PlaySound and not A_StartSound? PlaySound is deprecated and only useful for compatibility reasons.

Edited by Gianluco

Share this post


Link to post
  • 0
On 2/16/2024 at 11:59 AM, monkeymaster69 said:

still me soo ive been trying adding a custom sound for the rifle that replaces the ssg but idk how it works i tried checking the doom wiki but still doesnt do the sound of the bang how do i fix it?

 

You show in your screenshot the sound as "weapon/Rifleshot" in your DECORATE lump.

Do also have "weapon/Rifleshot" defined in your SNDINFO lump?

An excerpt from my SNDINFO:

 

//Enforcer fire sound
enforcer/fire     enfofire
//Fyredemon's fire breath
fdmon/breath      fyrbreth

 

So, you should have an entry in your SNDINFO which would look something like this:

//Rifle firing sound

weapon/rifleshot     browning

 

where "browning" is the name of the WAV sound you imported into your wad file.

lines that begin with // are comments btw.

 

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
Answer this question...

×   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...