AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   emit_sound underwater doesn't work (https://forums.alliedmods.net/showthread.php?t=309740)

GuskiS 08-05-2018 18:21

emit_sound underwater doesn't work
 
I'm using something like this:
PHP Code:

emit_sound(idCHAN_AUTOg_szSounds[0], 1.0ATTN_NORM0PITCH_NORM

but it fails underwater - only the id user can hear the sound, other players don't hear it.

I have tried different channels, none of the seem to be working.
Any ideas?

edon1337 08-05-2018 18:36

Re: emit_sound underwater doesn't work
 
Maybe the under-water sound overwrites it?

GuskiS 08-06-2018 07:04

Re: emit_sound underwater doesn't work
 
Probably, but that doesn't get me any closer to solution.

edon1337 08-06-2018 07:16

Re: emit_sound underwater doesn't work
 
Quote:

Originally Posted by GuskiS (Post 2608526)
Probably, but that doesn't get me any closer to solution.

It does, you can try blocking that sound, just I'm not sure of the sound names, as I'm unable to find them in my sound folder.

GuskiS 08-06-2018 08:13

Re: emit_sound underwater doesn't work
 
They are probably in halflife sounds folder.
However, that is not a solution, that would be nasty hack even if it is possible.

edon1337 08-06-2018 08:16

Re: emit_sound underwater doesn't work
 
Quote:

Originally Posted by GuskiS (Post 2608549)
They are probably in halflife sounds folder.
However, that is not a solution, that would be nasty hack even if it is possible.

Well, how do you think of resolving it then? What's hacky about this? You simply stop a sound when you want to play another. Even using stopsound might work, try it.

Natsheh 08-06-2018 13:21

Re: emit_sound underwater doesn't work
 
Try with channel CHAN_VOICE

GuskiS 08-07-2018 09:46

Re: emit_sound underwater doesn't work
 
Quote:

Originally Posted by Natsheh (Post 2608637)
Try with channel CHAN_VOICE

I have tried all channels, none of them worked.

Natsheh 08-07-2018 12:05

Re: emit_sound underwater doesn't work
 
Try to emit the sound from a non player entity.


All times are GMT -4. The time now is 17:34.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.