Play sound to player on first spawn

Nexion

L1: Registered
Aug 4, 2010
4
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?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
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.
 

Nexion

L1: Registered
Aug 4, 2010
4
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.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
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.
 

Nexion

L1: Registered
Aug 4, 2010
4
0
Well, this is a TF2 map, so there's gonna be more than one player on the server, hence my problem lol
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
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.
 

Da_Man

L4: Comfortable Member
Aug 23, 2009
173
39
IIRC, Convoy did this. I'm not sure how, but I know it did. Maybe decompile it and figure out from there.