Problems with creating custom music in a map

The_Gl!tch.exe

L3: Member
Apr 3, 2018
114
3
I'm a beginner at creating TF2-maps and I have problems concerning sounds.
I'm currently creating a trade map and it has a room with galaxy textures and the music playing is the Space Junk Galaxy theme from Super Mario Galaxy.
I have one entrance to the room and the room is inside a trigger brush (so you go through the trigger wall if you enter and leave).

When I enter the room the music plays, if I leave it the music stops.
The trigger is set to trigger_multiple but I have a problem with the output part (or maybe it's something else).
Even though the music has "is NOT looped" unticked it still doesn't loop.
It's also set on start silent.

If the outputs are set to "OnStartTouch" and "OnEndTouch" it only works if you're singleplayer. If someone else enters the room the music stops.

If the outputs are set to "OnStartTouchAll" and "OnEndTouchAll" I hear the music from outside because someone entered it. In order to let the music stops everyone has to get out of the room. And since the music doesn't loop the music stops if it ends and never plays again (until everyone leaves the room).

(btw. I've tested this only by airblasting enemy team bots into this room)

Is there any way to fix this?

Other topic:
If you set the ambient_generic on "play everywhere", does it play on the entire map or in the entire yellow circle/ball around it (not playing in the center)? I've only managed to fix it in my way of cloning existing ambient_generics with different names (because I don't want to hear the music in the room above it)

pls help : )
 
Last edited:

henke37

aa
Sep 23, 2011
2,075
515
Did you add the required tags to the sound file? Looping requires explicit start and end markers.

The "play everywhere" feature ignores the distance. Everywhere really is everywhere.
 

The_Gl!tch.exe

L3: Member
Apr 3, 2018
114
3
Looping is actually not really important for the map I'm currently creating but still thanks for the info : )


The actual problem I have is activating the sound with the trigger brush.

If you know the map dm_mariokart2_b3 I can give you an example of how I want to play the sound.
If you enter a room the music starts playing. If another player joins the room you still hear the music; but for the other player the music starts.
In other words: The music only plays for the players separately, not playing it for everyone at the same time on the map (e.g. like everyone hearing a gun shot)

I know it's difficult to explain it here
(I'm also German so my English can be bad sometimes)
It would be awesome if someone could help me : )
 

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
In other words: The music only plays for the players separately, not playing it for everyone at the same time on the map (e.g. like everyone hearing a gun shot)

So I assume you want music playing seperately for everyone.
1. Create a point_clientcommand somewhere and name it something such as clientcommand1
2. Now on the trigger that plays music on the person who enters it, give it this output:
OnStartTouch clientcommand1 command play music/mymusic1.mp3

Replace music/mymusic1.mp3 with your filepath to the music
 
Mar 23, 2013
1,013
347
So I assume you want music playing seperately for everyone.
1. Create a point_clientcommand somewhere and name it something such as clientcommand1
2. Now on the trigger that plays music on the person who enters it, give it this output:
OnStartTouch clientcommand1 command play music/mymusic1.mp3

Replace music/mymusic1.mp3 with your filepath to the music

Adding to this, if you want the music to be stoped when the player leaves the place, add this command to the trigger:

OnEndTouch - clientcommand1 - command - play pineapplepizza.jpg

Using the play command makes the previous sound played with this command stop even if you put in an invalid filename.
 
Last edited: