Problems with creating custom music in a map

Discussion in 'Mapping Questions & Discussion' started by The_Gl!tch.exe, Apr 3, 2018.

  1. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    67
    Positive Ratings:
    0
    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: Apr 3, 2018
  2. henke37

    aa henke37

    Messages:
    2,024
    Positive Ratings:
    487
    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.
     
    • Like Like x 1
  3. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    67
    Positive Ratings:
    0
    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 : )
     
  4. ficool2

    ficool2 L4: Comfortable Member

    Messages:
    156
    Positive Ratings:
    151
    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
     
    • Thanks Thanks x 1
  5. Lampenpam

    aa Lampenpam

    Messages:
    1,015
    Positive Ratings:
    342
    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.
     
    • Thanks Thanks x 1
    Last edited: Apr 5, 2018
  6. The_Gl!tch.exe

    The_Gl!tch.exe L2: Junior Member

    Messages:
    67
    Positive Ratings:
    0
    Thanks, it helped me a lot. : )