Playing voice files

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
Is there a way to make an entity that can play an administrator voice line.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
tf_gamerules. Send it PlayVO for both teams or PlayVOBlu/PlayVORed
as the parameter override use the name of the soundscript you want to play.

Use GCFscape to extract the voicelines so that you can play them (since hammer wont anymore) they're in common/team fortress 2/tf/tf2_sound_vo_english_dir.vpk

Find the line you want to play

Extract /scripts/game_sounds_vo.txt from common/team fortress 2/tf/tf2_misc_dir.vpk and do a search for the name of the voiceline mp3 you wanted to play.
Once you've found it, put the name of the entry as the parameter override for PlayVO.

eg:

onTrigger | tf_gamerules | PlayVO | Announcer.AM_RoundStartRandom
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
tf_gamerules. Send it PlayVO for both teams or PlayVOBlu/PlayVORed
as the parameter override use the name of the soundscript you want to play.

Use GCFscape to extract the voicelines so that you can play them (since hammer wont anymore) they're in common/team fortress 2/tf/tf2_sound_vo_english_dir.vpk

Find the line you want to play

Extract /scripts/game_sounds_vo.txt from common/team fortress 2/tf/tf2_misc_dir.vpk and do a search for the name of the voiceline mp3 you wanted to play.
Once you've found it, put the name of the entry as the parameter override for PlayVO.

eg:
So it can be like OnCapTeam2 | wut (tf_gamerules) | Announcer_am_capincite05
You can get them on the wiki couse it gives you the name when you download it

Edit: For some reason the sound does not play
 
Last edited:

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
tf_gamerules. Send it PlayVO for both teams or PlayVOBlu/PlayVORed
as the parameter override use the name of the soundscript you want to play.

Use GCFscape to extract the voicelines so that you can play them (since hammer wont anymore) they're in common/team fortress 2/tf/tf2_sound_vo_english_dir.vpk

Find the line you want to play

Extract /scripts/game_sounds_vo.txt from common/team fortress 2/tf/tf2_misc_dir.vpk and do a search for the name of the voiceline mp3 you wanted to play.
Once you've found it, put the name of the entry as the parameter override for PlayVO.

eg:
Its not working
 

Tumby

aa
May 12, 2013
1,084
1,192
The name of the soundscript entry is what you need. All you are using is the filename of the mp3, which is incorrect.

Edit:

I'm just gonna privde you with 3 soundscript entries to further tell you how its done:

Code:
"Announcer.Cart.Warning"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NONE"

   "rndwave"
   {
     "wave"   "vo/announcer_cart_attacker_warning1.mp3"
     "wave"   "vo/announcer_cart_attacker_warning2.mp3"
     "wave"   "vo/announcer_cart_attacker_warning3.mp3"
     "wave"   "vo/announcer_cart_attacker_warning4.mp3"
     "wave"   "vo/announcer_cart_defender_warning1.mp3"
     "wave"   "vo/announcer_cart_defender_warning2.mp3"
     "wave"   "vo/announcer_cart_defender_warning3.mp3"
     "wave"   "vo/announcer_cart_defender_warning4.mp3"
     "wave"   "vo/announcer_cart_defender_warning5.mp3"
     "wave"   "vo/announcer_cart_defender_warning6.mp3"
   }
}
"Announcer.RoundBegins10Seconds"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NONE"

   "wave"       "vo/announcer_begins_10sec.mp3"
}
"Announcer.AM_CapEnabledRandom"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NORM"


   "rndwave"       
   {
     "wave"     "vo/announcer_AM_CapEnabled01.mp3"
     "wave"     "vo/announcer_AM_CapEnabled02.mp3"
     "wave"     "vo/announcer_AM_CapEnabled03.mp3"
     "wave"     "vo/announcer_AM_CapEnabled04.mp3"
   }
}

Here, the "entry names" are called Announcer.Cart.Warning, Announcer.RoundBegins10Seconds and Announcer.AM_CapEnabledRandom. You can clearly see which sounds they play by looking at the lines that start with "wave". If the "wave"s are contained with in a "rndwave", it means that one of the given souns will play by random.
 
Last edited:

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Someone with connections to Valve should really ask them to patch MP3 support into Hammer so people can actually use the sound browser again.
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
The name of the soundscript entry is what you need. All you are using is the filename of the mp3, which is incorrect.

Edit:

I'm just gonna privde you with 3 soundscript entries to further tell you how its done:

Code:
"Announcer.Cart.Warning"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NONE"

   "rndwave"
   {
     "wave"   "vo/announcer_cart_attacker_warning1.mp3"
     "wave"   "vo/announcer_cart_attacker_warning2.mp3"
     "wave"   "vo/announcer_cart_attacker_warning3.mp3"
     "wave"   "vo/announcer_cart_attacker_warning4.mp3"
     "wave"   "vo/announcer_cart_defender_warning1.mp3"
     "wave"   "vo/announcer_cart_defender_warning2.mp3"
     "wave"   "vo/announcer_cart_defender_warning3.mp3"
     "wave"   "vo/announcer_cart_defender_warning4.mp3"
     "wave"   "vo/announcer_cart_defender_warning5.mp3"
     "wave"   "vo/announcer_cart_defender_warning6.mp3"
   }
}
"Announcer.RoundBegins10Seconds"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NONE"

   "wave"       "vo/announcer_begins_10sec.mp3"
}
"Announcer.AM_CapEnabledRandom"
{
   "channel"     "CHAN_VOICE2"
   "volume"     "VOL_NORM"
   "pitch"       "PITCH_NORM"

   "soundlevel"   "SNDLVL_NORM"


   "rndwave"      
   {
     "wave"     "vo/announcer_AM_CapEnabled01.mp3"
     "wave"     "vo/announcer_AM_CapEnabled02.mp3"
     "wave"     "vo/announcer_AM_CapEnabled03.mp3"
     "wave"     "vo/announcer_AM_CapEnabled04.mp3"
   }
}

Here, the "entry names" are called Announcer.Cart.Warning, Announcer.RoundBegins10Seconds and Announcer.AM_CapEnabledRandom. You can clearly see which sounds they play by looking at the lines that start with "wave". If the "wave"s are contained with in a "rndwave", it means that one of the given souns will play by random.
After the first fail with the mp3 files i tried these Announcer.AM_CapEnabled02 and Announcer.AM_CapIncite05 but its still not wotking. I even tried the one that was sugjested by the first coment.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
You seem confused about the tf_gamerules, are you actually sending the input to your tf_gamerules entity, or have you just written tf_gamerules in the target field?
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
The name of the soundscript entry is what you need. All you are using is the filename of the mp3, which is incorrect.
You can use both, but the filename only works when you add .extension to it.

You seem confused about the tf_gamerules, are you actually sending the input to your tf_gamerules entity, or have you just written tf_gamerules in the target field?
Both works, since a tf_gamerules entity is created if one hasn't been setup manually. I tried this myself and it works 100%
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
You can use both, but the filename only works when you add .extension to it.


Both works, since a tf_gamerules entity is created if one hasn't been setup manually. I tried this myself and it works 100%
but what did i do wrong i did everything that everyone sad :(
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Both works, since a tf_gamerules entity is created if one hasn't been setup manually. I tried this myself and it works 100%
Did you try sending stuff to 'tf_gamerules' if you've made a manual one with a different name? if Kai is working on that rottengurg map then there's already a gamerules in there somewhere. Must admit I haven't experimented since Valve added the entity as an actual entity, it was so confusing for new people back when it wasn't an entity you could place in hammer.

Kai, post a screenshot of the output you're sending to your tf_gamerules
 

henke37

aa
Sep 23, 2011
2,075
515
I think the I/O system checks for entities by class name after it has tried target name, as such "tf_gamerules" should work.
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
Did you try sending stuff to 'tf_gamerules' if you've made a manual one with a different name? if Kai is working on that rottengurg map then there's already a gamerules in there somewhere. Must admit I haven't experimented since Valve added the entity as an actual entity, it was so confusing for new people back when it wasn't an entity you could place in hammer.

Kai, post a screenshot of the output you're sending to your tf_gamerules

7Mvl8CWs.jpg
uOBaDBls.jpg
IpEBxbEs.jpg

Sory that its so late i didnt have time.