More ambient troubles
Post Reply
Quote
Re: More ambient troubles
Posted by Necromancer on Thu May 8th at 1:40am 2008


I got the PakScape file and every thing worked fine. Then I copied all of the new files that I got into a new folder that I created within valve.

Then I use the ambient_generic to make it play one of the wav files when I make a level.

How come whenever I do this it crashes the level and does not play? Do you know why this would happen? Any help would be very appreciated.





Quote
Re: More ambient troubles
Posted by Le Chief on Thu May 8th at 7:08am 2008


Accepted Answer
The ambient_generic is one of the most difficult things that new mappers find hard to set up, however with a bit of common sense and knowledge of the file structure, they are very simple and easy to master.

First of all, there is no need to extract these sounds outside the pak file, any mod or map can use these sounds. Say for example we want a sound file inside the pak0 file to play in our map, lets just pick any random one: ambience/boomer.wav. This is what we enter into the ambient_generics file name field, there is no need to enter: c:/sierra/half-life/valve/sounds.... because the game knows where the sound folder is and it will assume that everything you type in the file name field is is inside the sound folder.

If you want the sound to play when you trigger it, than you must check "start silent" in the flags because ambient generics are an on/off kind of entity. When the start silent flag is ticked, this means that the entity will start off in its off state, triggering the ambient_generic entity will cause it to toggle into its on state and play the sound.

Depending on what type of sound it is, you may want it to be playin in a small radius or across the whole level, this is done by the "Play everywhere, small radius, medium radius and large radius" flags, you should only have one of these flags ticked and they are pretty self explanatory.

The only other field you need to worry about is the Volume field, just remember not to put the sound louder than 10, otherwise half-life will crash.

So lets do an experiment, create an ambient_generic with the following settings:

Name: sound01
WAV name: ambience/boomer.wav
Volume: 10

Flags: Play everywhere, start silent

Now create a trigger auto with the following settings:

Target: sound01
Delay before trigger: 2
Trigger to send: on

Now compile the map and the sound should play. And now you know the basics for sound in a map.

Just a final note, and this note applies to models, sounds, sprites and maps. Say for example you have a sound, ambience/hello.wav in a map that is part of a mod. The engine will search 4 areas for the sound:

1) sound/ambience/hello.wav ( in the mod folder)
2) sound/ambience/hello.wav ( in the mod's pak0 file)
3) valve/sound/ambience/hello.wav
4) sound/ambience/hello.wav (in valves pak0 file)

It will first search 1, than 2, 3, 4 and if it dosen't find a sound in those 4 locations, than an error will be produced.






Quote
Re: More ambient troubles
Posted by Necromancer on Thu May 8th at 10:44pm 2008


Thank you for your help. Everything now works fine.



Quote
Re: More ambient troubles
Posted by Le Chief on Fri May 9th at 4:08am 2008


No worries mate <img src=" SRC="images/smiles/icon_smile.gif">





Quote
Re: More ambient troubles
Posted by Crucifix on Sun May 25th at 2:57am 2008


How do I make it so the sound loops? Im getting no luck with the wav I made using audacity...Help? <img src=" SRC="images/smiles/sad.gif">




Quote
Re: More ambient troubles
Posted by Le Chief on Sun May 25th at 6:12am 2008


Any sound can be looped easily. Download a program called "goldwave". This program can be used to edit all your half-life sounds and convert any sound into the right format for half-life (16 bit mono, 22050).

Open your sound in goldwave, than go tools > cue points, than add a cue point at the start of your wave file, then save your file and thats it.

Now when you trigger the sound in half-life, it will keep looping until you trigger it off or if the sound has a "is not looped" flag checked.






Quote
Re: More ambient troubles
Posted by Crucifix on Sun May 25th at 9:02am 2008


Thanks for the quick reply..Worked perfectly




Quote
Re: More ambient troubles
Posted by Le Chief on Mon May 26th at 4:11am 2008


No problem <img src=" SRC="images/smiles/icon_smile.gif">






Post Reply