just another ambient sound question!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

just another ambient sound question!

Post by General_DisArray »

i have tried all of the tutorials on this site that i have found. i have scripted everything that they say to script. i used my best judgement on where to and how to script these commands(some tutorials were not very verbose about where to put them). but, my map is still not playing any ambient sounds.
what am i missing? do i need to put the .mus, .scr, and the .bsp files into a .pk3 file before testing the map, or should it work just fine putting it in the map folder?
other sounds work just not the explosions, gun-fire, and other background effects that brings it all together.

thanks in advance.
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

The '.mus' file must be in the 'main/music' folder. I suggest putting everything related to your map in a '.pk3' file. It keeps you original installation of MOHAA nice and clean.

I don't ever put a '.bsp', or anything else for that matter, in the 'maps' or 'maps/dm' folders. And I will only have a single 'mymap.pk3' in the 'MOHAA' folder at a time. This way when I am testing, anything missing will show up. I have seen a few maps out there that do not follow this procedure and end up being distributed with missing textures and such.

Once I have finished my development, I move the '.min' file generated by MOHAA in the 'maps/dm' folder, into the 'mymap.pk3'. This way, the first time that someone runs 'mymap', the loading progress bar works.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

I do things a little differently while building than Innkeeper, although his process is a good one to follow. I'm working on a SH map and put all the related files and ONLY those files in the mainta/maps/dm folder. That would be the: bsp map scr vis lin min precache.scr

My music is in the main/music folder (the .mus file). In that script I tell where to find the sounds or music to play which for my map are stock and custom sounds that I've put into the music folder as it is a music piece. FOR now, that is where they are because I know it works that way!

Check your scripts. I had issues at first and got it working by putting this in my .mus file.....

path sound/amb_stereo

normal Amb_M3_TownExt.mp3 // Default
!normal volume 0.4
!normal loop
!normal fadetime 2


and this in my .scr file....

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
$player[local.playernum] stufftext "tmstartloop sound/music/mus_06a_mystery.mp3"


The sounds or musics can be anything, just be sure that the path is correct. All my sounds play how I want them...I actually got all the data from a tut at this site.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Slyk wrote:for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
$player[local.playernum] stufftext "tmstartloop sound/music/mus_06a_mystery.mp3"
Actually that won't work when a new player joins. I didn't realize this when I wrote the tutorial :oops: . I'll get a fix on later.

woyllib, could you be a little more specific regarding your problem. Post data such as the .mus file and the .scr file used.

I assume you want ambient sound that doesn't change? Then just the line 'soundtrack <musfilename>' in your script should get your sounds running.
Image
Guest

Post by Guest »

Thanks for the note JV.... guess I need to use the entire script route without the .mus file then.... for some reason I want to think that didn't work so well. Am I right to guess that I need triggers around every spawn location to be sure that the music starts.... IF I make the ambient the battle sounds?
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

The problem with ambient sounds in a multi-player map is that if you have triggers that change the sounds to several different ones, each time a player hits a trigger it changes the sounds for all the players. There are two that don't though, normal and failure. There could be more, but aux1 to aux6 work this way. :( This gives away the locations of other players.

If you are going to use only one, 'normal', you don't need any triggers at all. I have added a special '.mp3' to be played when you die (failure). It is only heard by the player that dies. 8)

If you add your own '.mp3', it should be put in a folder in 'MOHAA\main'. It can't be in your '.pk3' file. The default folder for ambient sounds is 'main\sound\amb_stero'. I suggest making a folder in 'main\sound\amb_stero' for your added '.mp3'. It makes them easier to find when you want to delete them. If you do this, you need to add the path below 'main\sound\amb_stero', to the reference of the '.mp3' in the '.mus' file. For example:

Code: Select all

// tutorial.mus

path sound/amb_stereo

normal Amb_t2l3_ColdWindExt.mp3  // Default
failure tutorial/Dust.mp3        // If you die
You'll notice that I have a folder named 'tutorial' where I have put the non-standard ambient sound.

For your trigger situation, it need only overlap or be in the bounding block of the spawn piont.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Ok, Innkeeper....varied question then that I asked last week and had some discussion with JV about....

I have an ambient battle sound playing level wide (MP map). I wanted to play Allied and Axis specific music, JV was working some ideas on that I think. Any thoughts of yours on that possibility?

Also, I was going to use the 'force music' function I saw in the SH TOW maps for the end to play winning side specific music. Curious if you tried that and could it be done the same way you did your 'failure' bit?
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

The 'failure' music is automatic. You will notice in the console when you die something like:

Code: Select all

Innkeeper took himself out of commision
You killed yourself
MUSIC: changing from [ aux3 | aux3 ] to [ failure | normal ]
MUSIC: changing from [ failure | normal ] to [ normal | normal ]
If 'failure' has no music associated with it, then it uses the fallback, 'normal'. The second music change is when I respawned.

Forcemusic is what is used in 'ambient.scr'. This maybe what is propragating to all players or it could be 'level.current_music' which is set in 'ambient.scr'.

I have been working on getting player specific sounds to work, but my online tester has been deployered to the Persian Gulf. I am setting up a second computer so that I can do all my testing by myself.

I would think that forcemusic would work for "the winning side" music. Just as I said before, the .mp3 can not be in the '.pk3', and each player would have to have a copy of the music.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Couldn't the 'force' music file be pk3'd with the path of /music though? Would that work, or do you need to instruct the person to extract that particular file to his own /music folder? Seems easiest from my side, but hard to be sure everyone follows the instructions.....how people actually READ the "Readme" files that come with the pk3s!?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Sorry, Mohaa can't stream music from a .pk3 file, it needs to be extracted.
Image
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

Make a distribution file, '.zip', with the paths built in. Put your '.mp3' file in 'sound\amb_stereo\mymapname'. This way when someone extracts the contents of your '.zip', it will end up in the right place, if they use the stored paths method. They wont have to think about it much, just explain in the readme file where it is when they want to remove it. Most people use path names by default. Thoses that don't are generally rather savy and understand how these things work. If they don't read the readme, well that's not your fault.

The 'music' folder contains the '.mus' file which stays in your '.pk3'.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Ok, sort of what I thought. I can distribute a "main" zip with a music specific zip AND the pk3, right!? THANKS!
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

I would leave the '.mp3' as is. Mine looks like:

Image
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Innkeeper, I can't seem to get my Winzip to enter the pathnames. I ended up having to use Pakcrap (pakscape) to build my pk3. Any clues about that settings? Can't seem to find any way to have it use the path.
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

With WinZip use "Add with wildcards" and check "Include subfolders"

Image
Post Reply