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

Damage Sound v2.1 (aka hitsound)


Post New Thread Reply   
 
Thread Tools Display Modes
Whosat
Senior Member
Join Date: Nov 2007
Location: Singapore
Old 09-02-2009 , 05:58   Re: Damage Sound
Reply With Quote #11

Quote:
Originally Posted by Chanz View Post
updated to 1.3.23 see first post for changelog.

(added the dystopia hitsound effect)
Awesome!
Only problem is when you light the tank on fire.
When it dies, the sound spams like crazy (quite lol)
__________________
Whosat is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 09-02-2009 , 06:33   Re: Damage Sound
Reply With Quote #12

Quote:
Originally Posted by Whosat View Post
Awesome!
Only problem is when you light the tank on fire.
When it dies, the sound spams like crazy (quite lol)
What tank? L4D? hmm since I don't have L4D I can't test it and it surprises me that npcs trigger the hurt event. O_o
Chanz is offline
Dominator
Senior Member
Join Date: Mar 2008
Old 09-02-2009 , 12:08   Re: Damage Sound
Reply With Quote #13

That happens as well with TF2 when a pyro lights someone on fire. Also people can tell who is a disguesed spy by randomly shooting their team mates.

Thanks for the request in adding a menu in the future, that will be really great!
__________________
Dominator is offline
Willamet
New Member
Join Date: Aug 2009
Old 09-02-2009 , 18:56   Re: Damage Sound
Reply With Quote #14

Can you make a way for the sound to dissable on pyros, or to use a different sound, because it spams like crazy, and is REALLY annoying.
Willamet is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 09-10-2009 , 16:02   Re: Damage Sound
Reply With Quote #15

Seems ok, approved
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 09-10-2009 , 17:56   Re: Damage Sound
Reply With Quote #16

Quote:
Originally Posted by Dominator View Post
That happens as well with TF2 when a pyro lights someone on fire. Also people can tell who is a disguesed spy by randomly shooting their team mates.

Thanks for the request in adding a menu in the future, that will be really great!
oh ok give me some time, I update it as soon as possible.

Quote:
Originally Posted by berni View Post
Seems ok, approved
thx

Last edited by Chanz; 09-10-2009 at 18:00.
Chanz is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 09-28-2009 , 22:02   Re: Damage Sound
Reply With Quote #17

I apologize for the bump, but I am having some problems, I added:

sm_damagesound_path "misc/hitlo.wav"
sm_damagesound_pitch "1"
sm_damagesound_pitch_time "1.0"
sm_damagesound_volume "0.8"

To my listenserver.cfg, but they don't seem to be taking effect in the game. Typing them manually works, or executing the config once the map loads, but that is a pain to do all of the time.

EDIT: It appears to lose the settings between maps too, and when people connect, they don't download the hit sound. Might wanna fix that.

Last edited by StrikerMan780; 09-28-2009 at 23:34.
StrikerMan780 is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 09-29-2009 , 17:19   Re: Damage Sound
Reply With Quote #18

I don't know about listenservers but try to insert that stuff into your server.cfg or autoexec.cfg then it should be executed to 99%. If it then still does not work I try to find the bug.
Chanz is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 09-29-2009 , 18:55   Re: Damage Sound
Reply With Quote #19

Tried, doesn't seem to stick. Thanks for the quick reply btw.
StrikerMan780 is offline
Darkhand
Member
Join Date: Sep 2008
Old 09-29-2009 , 21:59   Re: Damage Sound
Reply With Quote #20

Oddly I'm having the same problem on a listenserver when testing it out. It's retaining the very first cvar settings that were used when I first ran the plugin. No matter what I set the default to in the source, it gets changed to what it was when I first ran it. For example, if I set the default for sm_damagesound_pitch to 1 in the source and recompile, and then poll the cvar in game it shows: "sm_damagesound_pitch 0 (def 1)". It's like something is changing the cvar after the fact. Very odd, no other plugins do that, even on a listen server.

Anyway, the mod I'm using this on has very few shots before player death. I couldn't really hear the pitch increasing much before the player died, he was dead before it went up more than a few increments. So I increased the pitch counter to go up by 10 per hit instead of 1. The problem now is that in some very rare cases I'm going above 255 pitch and getting pitch out of bound errors. I tried limiting hitCounter to 255 as below, but not having much luck. Any ideas?

Code:
        if(GetConVarBool(cvar_soundpitch)){
            hitCounter[client][attacker] = hitCounter[client][attacker] + 10;
                
            if(hitCounter[client][attacker] > 255){  // Sanity Check, don't let
                hitCounter[client][attacker] = 255;  // pitch value go above 255
            }
        }
EDIT: I'm a newb. The pitch value is already 100 by default... adding 255 to that gives you 355. I changed 255 in the snippet above to 155 and it works perfectly. You might want to add that pitch sanity check into the default version; you never know if some mod will get the sound up past 255, even if it is just adding to the pitch 1 at a time.

EDIT EDIT: Figured out the listenserver issue as well, I didn't notice it writes its own config file... it's just pulling the original defaults that were first created in moddir/cfg/sourcemod/damagesound.cfg. I'm definitely a newb. Strikerman, modify or delete the config file and you'll be good.

One feature I'd like to request is the ability for users to enable or disable the sound for themselves, possibly through a clientpref? So far, most users are thrilled with the mod, but a few find it annoying.

Last edited by Darkhand; 09-30-2009 at 00:25.
Darkhand 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 15:56.


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