Playing voice files

Discussion in 'Mapping Questions & Discussion' started by KaidemonLP, Dec 1, 2015.

  1. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    Is there a way to make an entity that can play an administrator voice line.
     
  2. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    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:

     
    • Thanks Thanks x 2
    • Agree Agree x 1
    • Useful Useful x 1
  3. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    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: Dec 1, 2015
  4. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    Its not working
     
  5. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    934
    Positive Ratings:
    901
    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.
     
    • Useful Useful x 1
    Last edited: Dec 1, 2015
  6. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,215
    Someone with connections to Valve should really ask them to patch MP3 support into Hammer so people can actually use the sound browser again.
     
    • Like Like x 1
    • Agree Agree x 1
  7. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    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.
     
  8. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,152
    You forgot the PlayVO input. Reread YM's first post
     
  9. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    I forgot to write it but in the program i did put it
     
  10. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    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?
     
  11. MaccyF

    aa MaccyF Notoriously Unreliable

    Messages:
    901
    Positive Ratings:
    1,444
    i think he's saying "wut" is the name of his tf_gamerules
     
    • Agree Agree x 2
  12. Izotope

    aa Izotope Never releases maps

    Messages:
    604
    Positive Ratings:
    562
    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%
     
  13. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    but what did i do wrong i did everything that everyone sad :(
     
  14. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    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
     
  15. henke37

    aa henke37

    Messages:
    1,857
    Positive Ratings:
    430
    I think the I/O system checks for entities by class name after it has tried target name, as such "tf_gamerules" should work.
     
  16. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    [​IMG] [​IMG] [​IMG]
    Sory that its so late i didnt have time.
     
  17. MaccyF

    aa MaccyF Notoriously Unreliable

    Messages:
    901
    Positive Ratings:
    1,444
    you only uploaded thumbnails, those images are about 64 pixels wide
     
  18. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    Here is the link to the pictures in a bigger format: http://imgur.com/a/GVVqT
     
  19. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    I think noone ihas an answer
     
  20. KaidemonLP

    KaidemonLP L4: Comfortable Member

    Messages:
    189
    Positive Ratings:
    33
    Pls someone