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

Say Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 09-26-2007 , 23:12   Re: Say Sounds
Reply With Quote #111

You should be able to as long as its in the sound directory. What sound are you trying to make work?
__________________
Hell Phoenix is offline
Graf
Junior Member
Join Date: Aug 2007
Old 09-27-2007 , 02:46   Re: Say Sounds
Reply With Quote #112

Great job!
sm_time_between_sounds - the time is in minutes or seconds?
__________________
Sorry for my bad english
Graf is offline
lamdacore
Member
Join Date: Aug 2005
Old 09-27-2007 , 04:47   Re: Say Sounds
Reply With Quote #113

Hell Phoenix, you mentioned:
Quote:
Todo:
* Multiple sound files for trigger word
* Optimise keyvalues usage
* Save user settings
That reminds me, I modded your plugin since v1.3 to our needs. Now I just have modded your plugin v1.5 for our needs, too and maybe it helps you for your upcoming features, because some features I modded are these your planned to do.

Now I introduce the extra features that comes up with my mod.
  • Multiple sound files for trigger word. 1 sound file will be played randomly if a trigger has more than 1 sound file.
  • new CVAR sm_sound_disablelimit to disable sound limit. We don't need sound trigger to be limited by player. Just the anti Spam thing ist just fine.
  • Admins can trigger sound without spamprotections. So admin can spam the sounds
  • to enable force download of a sound it has to be specified in the saysounds config file. ("mustdownload" "1")
  • sound triggers are triggered in a sentence

so you have to be careful about the config file
Code:
       "muhaha"
        {
                "file"  "spackenz/EVIL-LAF.wav"
                "admin" "0"
        }
        "haha"
        {
                "file" "spackenz/haahaa21.mp3"
                "file_2" "spackenz/haahaa22.mp3"
                "file_3" "spackenz/haahaa23.mp3"
                "file_4" "spackenz/haahaa3.mp3"
                "admin" "0"
                "count" "4"
        }
        "bad"
        {
                "file"  "spackenz/killingisbadong.wav"
                "admin" "0"
                "mustdownload"  "1"
        }
count means the amount of files linked to the chat trigger haha. Chat trigger muhaha must be placed in the config file before haha because of if not, the plugin will find haha first, because of haha contains in muhaha. for sounds that should be forced download automatical on connection mustdownload has to be specified and set to 1.

All thinks I modded are specified with // MOD BY LAMDACORE and the changed code
for entire blogs there are a begin comment: // BEGIN MOD BY LAMDACORE and a end comment: // END MOD BY LAMDACORE for better reading the changes.

Maybe you could add some or all features in your original plugin.
Here is the plugin for all that want to have this features, too.

EDIT: Just figured out I had a bug in the precache sound .. should now work.
Attached Files
File Type: sp Get Plugin or Get Source (saysounds.sp - 715 views - 19.0 KB)

Last edited by lamdacore; 09-27-2007 at 06:45.
lamdacore is offline
Nomarky
SourceMod Donor
Join Date: Sep 2007
Old 09-27-2007 , 08:37   Re: Say Sounds
Reply With Quote #114

Quote:
Originally Posted by Hell Phoenix View Post
You should be able to as long as its in the sound directory. What sound are you trying to make work?
Ahh, the sounds don't live in the sound folder. I found them originally in an Eventscript, with paths like 'vo/ravenholm/yard_greetings.wav'. They are, I think, in compressed files included with the game install. Putting this path in saysounds.cfg doesn't work, though it does work in the SM Quake sounds plugin (http://forums.alliedmods.net/showthread.php?t=58548). Don't know the differences bettween how saysounds and quake are written, but anyway, its no biggy. Say sounds don't cut each other off now, which is good enough for me.

Cheers!
Nomarky is offline
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 09-27-2007 , 10:07   Re: Say Sounds
Reply With Quote #115

Time is in seconds of course.

Thanks for the file lamda...Ill see about adding some of it in.

I can look into using the game sounds at some point, it shouldnt be all that difficult.
__________________
Hell Phoenix is offline
steambob
Member
Join Date: Sep 2007
Old 09-27-2007 , 10:30   Re: Say Sounds
Reply With Quote #116

@Hell Phoenix:
thanks for the nice plugin.

Just one thing. I had a problem with !soundlist command (it did not list anything) and looked at the code.

I've seen that for !soundlist to work properly it is required to have "ExitSound" entry in the sounds config file and it should be placed exactly before all the sounds one wants to have in !soundlist. I did not have ExistSound entry in my config file (I've deleted it previously).

Could you make List_Sounds skipping ExitSound and JoinSound, not requiring to have those in the config file at all?

Thanks.
steambob is offline
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 09-27-2007 , 10:48   Re: Say Sounds
Reply With Quote #117

No, they are required entries. There is no reason not to have them as they can be turned off and not used.
__________________
Hell Phoenix is offline
lamdacore
Member
Join Date: Aug 2005
Old 09-27-2007 , 10:55   Re: Say Sounds
Reply With Quote #118

Quote:
Originally Posted by Hell Phoenix View Post
Thanks for the file lamda...Ill see about adding some of it in.
That would be great

I forgot to mention, i didn't change the code for Insurgency specific things, so my extra features wouldn't work for Insurgency.
lamdacore is offline
steambob
Member
Join Date: Sep 2007
Old 09-27-2007 , 11:16   Re: Say Sounds
Reply With Quote #119

Well, then it would be good to mention in the description (better directly in config file) that the entries are required.

While editing the config file I just deleted them because I did not need the sounds. May be other users would also do the same.

Anyway, you decide if this is important.
steambob is offline
lamdacore
Member
Join Date: Aug 2005
Old 09-28-2007 , 04:52   Re: Say Sounds
Reply With Quote #120

Hoihoi,

I tested my mod yesterday and figured it out .. the flooding protection thing don't fit our needs. In v1.3 I modded this feature on my own but till v1.5 I thought this isn't necessary anymore because the plugin provide it from now on.

So I modded this feature to be global and not player specific. It means that if somebody triggers a sound, all player have to wait the given amount of time before they can trigger the next sound. This prevent sound flooding by different players. Admins aren't included by this rule so they still can spam sounds.

I just attached the saysounds file like the other time, too.
Hell Phoenix, mabe this is a good feature for your official plugin, too.
Attached Files
File Type: sp Get Plugin or Get Source (saysounds.sp - 556 views - 19.2 KB)

Last edited by lamdacore; 09-28-2007 at 04:54.
lamdacore 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 16:24.


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