Adding sound to footsteps/texture Created 16 years ago2008-10-18 02:59:20 UTC by zeeba-G zeeba-G

Created 16 years ago2008-10-18 02:59:20 UTC by zeeba-G zeeba-G

Posted 16 years ago2008-10-18 02:59:20 UTC Post #257289
Is there a way to add sounds to a texture? In hl, metal has a metal sound when walked over. I want to add a puddle sound to a grass texture. How do I do this?
Posted 16 years ago2008-10-18 09:17:28 UTC Post #257292
To make a certain texture produce a sound when walking over it, you'll need to define an entry in a file called materials.txt.
This file is located in the pak0.pak (for WON HL) under the sounds folder.

In your case, you simply add the following line to the file:

M nameofyourtexture

M makes it a metal sounding texture, while D makes it a dirt sounding texture, P is computer, Y is glass etc. Its all there in the file.
Posted 16 years ago2008-10-18 11:19:14 UTC Post #257297
But what if you want to add a custom sound not the default hl ones ? For example a swamp walk sound .
Striker StrikerI forgot to check the oil pressure
Posted 16 years ago2008-10-18 11:36:07 UTC Post #257298
Then you probably need to code that.
Posted 16 years ago2008-10-18 11:36:35 UTC Post #257299
you replace the original sound with your one if its for a mod. otherwhise u cant.
Skals SkalsLevel Designer
Posted 16 years ago2008-10-18 12:22:16 UTC Post #257301
Ok I opened up the file and scrolled to the bottom and typed "S arc_grass9" and hit save. Than when I x out of the file it gives me this error message "error updating sound/materials.txt: Invalid filename."
Posted 16 years ago2008-10-18 12:47:26 UTC Post #257306
Are you trying to save it into the .pak file? If you are, you shouldn't be. Save it in the same location as in the pak, but in the Half-Life directory instead.
Strider StriderTuned to a dead channel.
Posted 16 years ago2008-10-18 13:08:09 UTC Post #257307
Awesome, I saved it into my sound folder and now it works. So when Other people download the bsp, will the sound still be in the texture?
Posted 16 years ago2008-10-18 13:14:18 UTC Post #257308
what strider said. i dont think i know what folder it is tho. maybe just plain valve/the mods folder.

also im not sure if S is a valid one. are you tryingto get sand?

EDIT: if you include the sound file into your zip file and the player puts it into the right directory then yeah it will work for them.
Skals SkalsLevel Designer
Posted 16 years ago2008-10-18 13:27:30 UTC Post #257311
OK just for the sake of free space I'm going to ask a texture question in this thread ( off topic , sorry)

I made a wad texture I'm using in my map . The problem is , as I am still working with that wad in hammer and the map is not ready , can I modify the wad ( just adding textures , not modifying others) so the hammer configuration and BSP to work ?
Striker StrikerI forgot to check the oil pressure
Posted 16 years ago2008-10-18 13:52:47 UTC Post #257312
[quote]So when Other people download the bsp, will the sound still be in the texture?[quote]

No, they'll need the materials.txt file and the sound itself.
I made a wad texture I'm using in my map . The problem is , as I am still working with that wad in hammer and the map is not ready , can I modify the wad ( just adding textures , not modifying others) so the hammer configuration and BSP to work ?
What? Clarify that a bit more.
Posted 16 years ago2008-10-18 14:18:23 UTC Post #257313
I added the wad I prepared for my map in hammer to use it . And I already used some textures from that wad and now I want to add more textures to that wad without modifying the others. You know , just adding some pictures to the wad . Is it possible without errors ?
Striker StrikerI forgot to check the oil pressure
Posted 16 years ago2008-10-18 14:34:06 UTC Post #257314
Yup. Close hammer then go to your favorite WAD editor and add in new textures. save and reboot hammer. I do it all the time. Hope I explained it properly...
Notewell NotewellGIASFELFEBREHBER
Posted 16 years ago2008-10-18 14:43:06 UTC Post #257315
Oh , O.K. thanks that's perfect :D
Striker StrikerI forgot to check the oil pressure
Posted 16 years ago2008-10-18 15:59:48 UTC Post #257316
Isn't it a bad idea to change materials.txt? If another person decides to do the same, once you download his map, his version of materials.txt will overwrite yours and the texture-sound in your map won't work anymore?
Posted 16 years ago2008-10-18 16:48:04 UTC Post #257317
Not if you keep the original unmodified materials.txt file inside the pak file.

But you can only have one modified materials.txt file in your sounds directory until you download a map that also uses a modified file. Then you would overwrite the one you previously downloaded, in this case zeeba-G's materials.txt file, making the custom sound textures in his map to not produce the sound any more when you walk over them.

So yeah, making a custom materials.txt is pretty pointless.
Posted 16 years ago2008-10-18 17:27:40 UTC Post #257318
But you can only have one modified materials.txt file in your sounds directory until you download a map that also uses a modified file. Then you would overwrite the one you previously downloaded, in this case zeeba-G's materials.txt file, making the custom sound textures in his map to not produce the sound any more when you walk over them.

So yeah, making a custom materials.txt is pretty pointless.
Yeah, that's what I meant.
You must be logged in to post a response.