Play sound to player on first spawn

Discussion in 'Mapping Questions & Discussion' started by Nexion, Aug 4, 2010.

  1. Nexion

    Nexion L1: Registered

    Messages:
    4
    Positive Ratings:
    0
    I'm trying to add a welcome sound to players when they first spawn.
    Right now I have an ambient_generic playing my sound file triggered by a trigger_multiple that's right under where players spawn (they fall onto it).

    The problem with that is, everyone can hear it, and players will be able to trigger it more than once.

    What I'm looking for is to play a sound ONCE when they first spawn, then not play it again if they pass through the trigger.

    I know you can do this easily with scripts but I don't want to have to have a script tied with the map. (At least in a separate file, I don't know hammer all that well so if there's a way you can embed a script in hammer let me know)

    Anyone have any ideas?
     
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,879
    Positive Ratings:
    4,970
    You can pak script files into the bsp as far as I know with pakrat
     
  3. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Players don't fall down from the i_p_t; they spawn at the XY coordinates of the i_p_t on the nearest horizontal textured surface.

    You can put a trigger_multiple under only one i_p_t. I daresay that the first player will spawn in the one that's the lowest and to the left on the top view or closest to the origin. Have that t_multiple output to an ambient_generic and make sure the a_generic has 'play only once' enabled.
     
  4. Nexion

    Nexion L1: Registered

    Messages:
    4
    Positive Ratings:
    0
    I'm new to hammer. What is i_p_t?
    And there's a problem with doing it that way - what if the server isn't full when the round starts? Players don't always spawn at the same spawn point, so someone could trigger it more than once or some players could never hear it.
     
  5. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    i_p_t is short for info_player_teamspawn; I'm too lazy to type it out, sorry :p

    I'm pretty sure that if there is only one player on the server, they'll always spawn in the same location, which is the i_p_t closest to the origin. I am not positive about this, however.
     
  6. Nexion

    Nexion L1: Registered

    Messages:
    4
    Positive Ratings:
    0
    Well, this is a TF2 map, so there's gonna be more than one player on the server, hence my problem lol
     
  7. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    I don't think you understand my point. No matter how many players on the server, I believe that the spawnpoints will begin to fill up starting with the one closest to the origin. Hence, as long as there's a player on a team, that team's i_p_t closest to origin will always have a player spawning there.
     
  8. Da_Man

    Da_Man L4: Comfortable Member

    Messages:
    173
    Positive Ratings:
    38
    IIRC, Convoy did this. I'm not sure how, but I know it did. Maybe decompile it and figure out from there.
     
  9. strangemodule

    strangemodule L5: Dapper Member

    Messages:
    223
    Positive Ratings:
    59
    Maybe try a trigger_once?