Is there any way to make a sound only play for one team?

Discussion in 'Mapping Questions & Discussion' started by Icarus, Nov 16, 2008.

  1. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    Like, if I wanted to make custom announcer sounds :D
     
  2. slix00

    slix00 L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Not that I know of. You could make the sound only play on 1 side of the map, but that leaves out spies and the like.
     
  3. Artesia

    Artesia L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    72
    • Thanks Thanks x 1
  4. Artesia

    Artesia L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    72
    I just got mine working... if you do everything like he posted in that thread you would need 2 giant full map trigger_multiples for every sound... I found a way you only need 2 and can add more sounds to it...

    I'll try to explain how I did it...

    I have the 2 giant trigger_multiples, same name, each filtlered to a different team. starts disabled, outputs are, onstarttouch it attempts to trigger a bunch of logic_relays, one for each sound.

    These logic relays, are not only one for each sound, but also one set per team, I am using 9 custom sounds so I have 18 relays. each one outputs its own sound to its associate team's point_clientcommand. All these logic_relays are disabled.

    Lets just say that the event we are making the sound for is red picking up the blue intel. for me the 2 sounds for intel pickup are 1 (for friendly pickup) and 5 (for enemy pickup). so I want red to hear the sound from the 1st red specific logic relay, and blue to hear the 5th blue specific logic relay...

    first off, when the intel is picked up, all the logic relays are triggered off again, before we do anything else (since we will now attempt to enable only the relays we want).

    There is also 1 math_counter per team per event (not sound, picking up the intel is 1 event but has 2 possible sounds). Now that the event is triggered and we sent a disable to our relays, we fire out a SetValue into the math_counters for each team corresponding to which sound we want them to hear. in our case we would set the red_intelpickup_mathcounter to a value of 1, and the blue_intelpickup_mathcounter to a value of 5.

    .01 seconds after seting the values of the mathcounters, we fire a getvalue to both counters, this triggers them to perform their output event.

    the mathcounters have an output value for when they recieve the Getvalue event, to send their value to a logic_case (once again one for each team). the logic case is where all the logic_relays are listed (the case value should be the number you assigned the sound, no 2 should be the same.)

    The output of each case is to enable the sound of the associated value we sent it from the math counter, in our case, the red logic_case would enable red_logic_relay1 (sound 1) and the blue logic_case would enable blue_logic_relay5(sound 5). this is why we started out with disabling all, so that any sounds from any events before wouldn't play.

    now we have the right sounds enabled... all thats left is to play them
    .01 seconds after our last event, we now enable the huge teamfiltered trigger multiples... .01 seconds after that disable it again.

    during that .01 seconds the triggers will try to trigger all the logic_relays to play the sounds, but only those that are enabled will play.

    I dunno how much sense that makes without me taking screens... if there is enough demand I could actually put this in tutorial form...

    I chose to do it this way so I didn't have to mess with more than 2 huge brushes, there are more entities this way, but I keep them organized and would rather move them around then giant brushes... I would have needed to make 18 brushes that encompased the entire level to accomplish what I did with 2 giant brushes, 18 logic_relays, 10 math counters, 2 logic_cases, and 2 point_clientcommands.... so its complicated either way, it just depends on what you want to mess with.
     
    • Thanks Thanks x 1
  5. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    I think I can find a way to do it now, thanks!

    It's just the use of point_clientcommand to play vo wavs locally, yes?

    simple!

    Now I can use

    "Alert! The payload has been captured!"
    and
    "We have captured the payload!"

    :D
     
    Last edited: Nov 16, 2008
  6. Zeewier

    Zeewier L9: Fashionable Member

    Messages:
    619
    Positive Ratings:
    130
    you cut the originals to make the announcer say that or did you use a custom voice?
     
  7. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    The former