Results 1 to 8 of 8

Thread: Last Touches on My Custom Map (Sound Problem)

  1. #1

    Default Last Touches on My Custom Map (Sound Problem)

    I have just about finished my second custom map, and am just trying to add a couple of sounds to my map. I tried to follow the tutorial here -

    http://www.mohaaaa.co.uk/mohaa/tutor...sounds_new.php

    However the instructions seemed a bit different from what I was trying to accomplish. I am just trying to add these two sounds in two small separate portions of the map playing on radios (not change the entire ambient)

    sound/mechanics/Mec_RadioMusic_01.wav soundparms 0.5 0.0 1.0 0.0 150 800 local streamed maps "m2l1 m6l2a dm moh obj train"
    sound/mechanics/shortwave2.wav soundparms 0.7 0.0 1.0 0.0 100 900 auto streamed maps "m dm moh obj"

    Can anyone kind of simplify this for me or point me in the direction of a better tutorial for this? I had also briefly tried to get sound to play by making a "sound_speaker" giving it a target name, and an aliascache in the map script but that didn't work either.

    Thanks,

    <T|F|B>The Shadow

  2. #2

    Default

    instead of making a sound_speaker, you can make a script_model with a fx/dummy.tik model,
    then press the "script..." button and add your custom loopsound

    like this:


    the only thing you have to add to your map script is the aliascache with your custom sound

  3. #3

    Default

    You can also add it to your default map script if you give your script_model a targetname. Make sure to add your map name for the aliascache.

    local.master = spawn ScriptMaster

    local.master aliascache radiomusic sound/mechanics/Mec_RadioMusic_01.wav soundparms 0.5 0.0 1.0 0.0 150 800 local streamed maps "yourmapname"
    local.master aliascache shortwave sound/mechanics/shortwave2.wav soundparms 0.7 0.0 1.0 0.0 100 900 auto streamed maps "yourmapname"

    $mysoundentity1 loopsound radiomusic
    $mysoundentity2 loopsound shortwave


    It may be advantageous to do it this way as you don't have to recompile your map to make changes, which can be a nightmare when testing. I also sometimes lose track of code if it's fragmented.

    It may also be worth checking ALWAYS_DRAW on your dummy entity so it continues playing even if it's outside your PVS, but this depends on your map and what you want. So, for example, if your entity is inside a room that is culled when you're outside it, your sound will continue playing.
    Last edited by 1337Smithy; January 27th, 2019 at 04:33 AM.

  4. #4

    Default

    Thanks Smithy! added it to default script after making it a script model like you mentioned and it worked.

  5. #5

    Default

    One issue I also noticed with the sound is that it is playing through the floor to rooms below. Is there a way to limit it so it cant be hear though walls?
    The walls it is being heard through are structural brushes.

  6. #6

    Default

    Are you sure the room isn't rendered when you're below it? In the version I sent I can't hear the music underneath. So it suggests you haven't made all the changes yet.

  7. #7

    Default

    I can send you the .map I have again if you would like, when in the hallway looking using r_showtris 1 you can't see the room above it but you can hear the radio music. I did make a few small adjustments when you sent the .map back such as slightly increasing the skybox by the gate (not by more than 40 so units in one direction however) to fix some lighting issues.

  8. #8

    Default

    r_showtris 1 only show triangles that you can see. r_showtris 2 is what you want to use . And using -bounce 0 is fine, radiosity lighting is temperamental to say the least so don't worry about it. Light phase should be -final -bounce 0

    Looking at the map, it has a leak underneath where the skybox was moved - a massive gap by the bottom caulk brush. Your entire map was still being rendered. During the compile it tells you on the BSP phase.

    I also noticed light seeping between the rocks where you said there was a problem and just put some caulkshadow on the back faces to block the light. It's a very useful shader .

    I'll send back an edit with this fixed.
    Last edited by 1337Smithy; February 2nd, 2019 at 08:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •