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

Say Sounds (including Hybrid Edition) (4.0.8)


Post New Thread Reply   
 
Thread Tools Display Modes
drwhooo
Member
Join Date: Dec 2009
Old 12-06-2009 , 10:44   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #341

My searchfu is very bad.... Does anyone have a mega sound pack for this that they put together? (and maybe a quick tut on how to make it work... if its as hard as the equip/hats mod ill prolly need it lol)
drwhooo is offline
drwhooo
Member
Join Date: Dec 2009
Old 12-06-2009 , 10:47   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #342

My searchfu is very bad.... Does anyone have a mega sound pack for this that they put together? (and maybe a quick tut on how to make it work... if its as hard as the equip/hats mod ill prolly need it lol)
drwhooo is offline
gHOSt | ''powah,
Junior Member
Join Date: Aug 2009
Location: Leicester, UK
Old 12-06-2009 , 10:50   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #343

In HL2DM, can I get this plugin to play a sound when a player is killed by a weapon_frag? And possibly display a line of txt in the centre of the screen? Oh, and if so - will it work on Bots (unlike Keeper's Streak Sounds)?

Thanks
__________________
gHOSt | ''powah, is offline
Send a message via MSN to gHOSt | ''powah, Send a message via Skype™ to gHOSt | ''powah,
drwhooo
Member
Join Date: Dec 2009
Old 12-06-2009 , 11:10   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #344

My searchfu is very bad.... Does anyone have a mega sound pack for this that they put together? (and maybe a quick tut on how to make it work... if its as hard as the equip/hats mod ill prolly need it lol)
drwhooo is offline
drwhooo
Member
Join Date: Dec 2009
Old 12-06-2009 , 11:23   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #345

Since it was a oopsy dub post....

So i was bored and didnt want to hand edit in 100+ sounds so i wrote this little bit of code to give me the meat of the config file... just take whats in the text and past it into it...(might have to do a replace on the ' for a ").. might have to change a couple of things here and there for your file struc.. but ya... anywho

c++ btw...
Code:
  
// Written by Dr. Whooo 12/12/09 -- Feel free to use/modify
// conParse.cpp : Defines the entry point for the console application.
//This generates the meat of the saysounds config. Enter your file path and then 
//paste the contents of saySoundConfigParsed.txt into your current config file. You may need to use find/replace on all the ' and change them to ".
//Uncomment the 

#include "stdafx.h"
#include "dirent.h"
#include <fstream>
#include <string>
#include <iostream>
using namespace std;


int main ()

{
    string temp;
DIR *dir;
struct dirent *ent;
        // Path that this looks for sounds. If you change anything besides the <insert name>(past sound\\), make sure you also match it up with the output text as well
        dir = opendir ("C:\\Program Files\\Steam\\steamapps\\<insert name>\\team fortress 2\\tf\\sound\\misc");
if (dir != NULL) {
    //output file locations
    ofstream outMyStream ("c:/saySoundConfigParsed.txt");
    ofstream outMyStream2 ("c:/AutoDler.txt");
       

  /* print all the files and directories within directory */
  while ((ent = readdir (dir)) != NULL) {
      printf ("%s\n", ent->d_name);
      temp = ent->d_name;
      //string temp2 = (temp -4);
      //string temp2 = ent->d_name; 
      //temp2 = (temp2.begin(),temp2.end()-4);
      if (outMyStream.is_open())
      {
            // creates a second string with substr(start pos, length) using size() of temp string - 5 (.***0) ... there is a 0
          string temp2 = temp.substr (1, temp.size() - 5);

          //saysound config
         outMyStream << "'" << temp2 <<"'\n    {\n            'file'    'misc/" << temp << "'\n}\n\n";
            //autoDLer config  -- uncomment to use       
         // outMyStream2 << "sound/misc/" << temp << "\n" ;
            
        // format of the config file
        //     "lol"  // Word trigger to randomly select 1 of multiple sounds
        //{
        //    "file"    "misc/laugh.wav"    // name of the 1st option, can also be "file1"
        //}
       }
      
    
  }
  closedir (dir);
    outMyStream.close();
} else {
  /* could not open directory */
  perror ("");
  return EXIT_FAILURE;
}
}

Last edited by drwhooo; 12-12-2009 at 10:36. Reason: dub post
drwhooo is offline
bstyle
Member
Join Date: Nov 2009
Old 01-06-2010 , 05:03   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #346

Is it possible to play a sound and the map end?
If not, you should add this feature. random map end sound.

Improvements:

For the admin menu integration:

Menu shouldn't close when choosing an option.
Maybe move the hole say sound options into a seperate mainmenu item like 4. Sounds

Last edited by bstyle; 01-06-2010 at 08:45.
bstyle is offline
_Radon
Junior Member
Join Date: Jan 2010
Old 01-06-2010 , 18:35   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #347

I tried to insert a sound that will be played then an user joins, like "welcome to server blah blah"

this is my test config file:

Code:
    "Sound Combinations"
        {
            "JoinSound" // Sound to play when a player Joins the server
            {
                "file"    "ggmjsoundset/ggmjwelcome.mp3"
                "admin"    "0"
                "single" "1" // 1 to play sound to single client only, 0 to play to all (default is 0)
            }

            "lol"  // Word trigger to randomly select 1 of multiple sounds
            {
                "file"    "ggmjsoundset/ggmjwelcome.mp3"    // name of the 1st option, can also be "file1"
            }


            "headshot"
            {
                "file"    "misc/headshot.mp3"
                "admin"    "0"
                "actiononly" "1"
                "action"    "headshot"
                "param"        "headshot"
            }
        }
if I write "lol" in the chat, the sound is played. but if i join, i can hear nothing. Same for the headshot. Nothing to hear

What is wrong?
The soundfiles exist on the server.

pure is set to 0.
_Radon is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 01-07-2010 , 13:59   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #348

Quote:
Originally Posted by bstyle View Post
Is it possible to play a sound and the map end?
Not really. You can play sounds at map end, but by then either all of the clients have already been disconnect or they will be disconnected immediately afterwards, so they won't actually hear the sound..
naris is offline
freeze4hct
Junior Member
Join Date: May 2008
Old 01-08-2010 , 05:09   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #349

It would be nice to have the following feature:

- Automatic stop of the old sound if another one is played so that there can only be one sound played at the same time.

Do you plan to have this feature in future releases?
freeze4hct is offline
_Radon
Junior Member
Join Date: Jan 2010
Old 01-08-2010 , 15:42   Re: Say Sounds (including Hybrid Edition) (3.2.0)
Reply With Quote #350

seconded. an automated stop function would be nice as well.

i also noticed that you included the TF2 Endround sound plugin in this plugin?

i tried and copy-pasted my endroundsound.cfg into the saysound.cfg and disabled the endroundsound.cfg, but nothing to hear.

what's wrong?
_Radon 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 09:57.


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