Raised This Month: $51 Target: $400
 12% 

Solved Emit Sound Problem. Fire sound is overlapping my sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
esenrik
Senior Member
Join Date: Jul 2010
Old 07-01-2018 , 09:51   Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #1

Hello!

I created a reloading sound for players, the character says with emit sound: "I'm reloading!!".

The sound works perfectly when no one is shooting, but the problem is that the engine shoot sounds overlaps my sound.

Any way to fix it?

My code (there are 4 possible reload sound random choosed):

PHP Code:
new random random_num(14)
        if (
random == 1) {
        
emit_sound(idCHAN_VOICEreload11.0ATTN_NORM0PITCH_NORM)
        } else if (
random == 2) {
        
emit_sound(idCHAN_VOICEreload21.0ATTN_NORM0PITCH_NORM)
        } else if (
random == 3) {
        
emit_sound(idCHAN_VOICEreload31.0ATTN_NORM0PITCH_NORM)
        } else if (
random == 4) {
        
emit_sound(idCHAN_VOICEreload41.0ATTN_NORM0PITCH_NORM)
        } 
I don't understand for example why Zombie Madness item of zombie plague always plays sound correctly and why my sounds are being overlapped

PD: I tested all channels. Including CHAN_AUTO.

Last edited by esenrik; 07-02-2018 at 06:04.
esenrik is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-01-2018 , 10:21   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #2

Have you tried other channels?
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 07-01-2018 , 10:23   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #3

Quote:
Originally Posted by Ghosted View Post
Have you tried other channels?
All channels
esenrik is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-01-2018 , 14:07   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #4

To improve, use switch statement instead.
__________________








CrazY. is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-01-2018 , 15:36   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #5

Quote:
Originally Posted by CrazY. View Post
To improve, use switch statement instead.
or create string array and use random function.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-01-2018 , 16:33   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #6

change from CHAN_VOICE to CHAN_WEAPON

Edit:
(From Zombie Madness)
PHP Code:
emit_sound(idCHAN_VOICEsound1.0ATTN_NORM0PITCH_NORM
Basically, Zombie Madness using CHAN_VOICE channel so the sound would overlap. I usually use CHAN_WEAPON for shooting sounds and CHAN_ITEM for other effect on the gun.
__________________
My plugin:

Last edited by Celena Luna; 07-01-2018 at 16:36.
Celena Luna is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-01-2018 , 17:00   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #7

But he said that he checked it on all channels
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Old 07-01-2018, 17:05
Celena Luna
This message has been deleted by Celena Luna. Reason: Wrong...
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-01-2018 , 17:15   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #8

Check if any of your weapon you are using have CHAN_AUTO or CHAN_VOICE for shooting sound
__________________
My plugin:
Celena Luna is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 07-01-2018 , 17:23   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #9

Quote:
Originally Posted by Celena Luna View Post
Check if any of your weapon you are using have CHAN_AUTO or CHAN_VOICE for shooting sound
I never modified weapon sounds, so they are using the default shooting channel...
esenrik is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-01-2018 , 17:30   Re: Emit Sound Problem. Fire sound is overlapping my sounds
Reply With Quote #10

Quote:
Originally Posted by esenrik View Post
I never modified weapon sounds, so they are using the default shooting channel...
If possible, show full code is recommended (or that is all you wrote?)
__________________
My plugin:

Last edited by Celena Luna; 07-01-2018 at 17:30.
Celena Luna is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:41.


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