Raised This Month: $32 Target: $400
 8% 

Emit Sound volume changes randomly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-07-2016 , 13:24   Emit Sound volume changes randomly
Reply With Quote #1

So, these days i've been working with the emit sound forward and i noticed the following
While trying to emit a sound from the weapon entity when deployed, the volume of the sound variated in volume, sometimes it being lound sometimes low to very low

I did not test on any previous versions of amxmodx except the latest dev build of 1.8.3

Test Script, p.s chose your sound's path
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "White"

#define SoundPickup "chose a sound"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Item_Deploy"weapon_hegrenade""fw_DeployGrenade"1)
    
    
// Add your code here...
}

public 
plugin_precache()
{
    
precache_sound(SoundPickup)
}

public 
fw_DeployGrenade(ent)
{

    
emit_sound(entCHAN_WEAPONSoundPickup1.00.20PITCH_NORM)

__________________
Depresie is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-07-2016 , 14:59   Re: Emit Sound volume changes randomly
Reply With Quote #2

its because the distance between you and the weapon thats just how emit_sound works if you are far you will hear the low if you are close you will hear it loud.
__________________
JusTGo is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-07-2016 , 15:24   Re: Emit Sound volume changes randomly
Reply With Quote #3

look at the code closely, the weapon is in my hand !
__________________
Depresie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-07-2016 , 15:39   Re: Emit Sound volume changes randomly
Reply With Quote #4

I don't know about you issue, but just say this is unrelated to AMXX as such native calls directly the engine function.
__________________
Arkshine is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-07-2016 , 17:18   Re: Emit Sound volume changes randomly
Reply With Quote #5

Are you sure there are no changes that could interfere with that?
I tried to emit the sound on the owner, works flawless, but when i emit sound on entity, 2/5 of the times the volume gets very low, like 0.2 of the volume it should have

I also noticed it is also happening sometimes on the napalm grenades made by mercylez, that are using custom sounds on explode

I will run tomorow the same test on 1.8.2 and return with the results

P.S: And yes, i know about the sound attenuation, and how it works, so it's not that the problem
__________________

Last edited by Depresie; 02-07-2016 at 17:20.
Depresie is offline
Reply


Thread Tools
Display Modes

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 01:46.


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