BNA!@Posted: Thu Aug 12, 2004 5:01 pm :
write a sound shader and include "looping" as parameter



Crevalle@Posted: Thu Aug 12, 2004 5:12 pm :
Guys, I've been editing for three days. What's a sound shader, and how to do I "write" one?



rich_is_bored@Posted: Thu Aug 12, 2004 6:17 pm :
They are text files that explain to the game what files should be associated with a sound.

For instance, a bullet ricochete may have a few different files associated with it because not all ricochetes sound the same and it would be kinda stupid if you heard the exact same noise everytime it happened in the game.

Basically the shader provides the game with a list of sounds to choose from so that there is some variety.

You can take a look at some examples in pak003.pk4.



Crevalle@Posted: Thu Aug 12, 2004 11:17 pm :
Someone mentioned putting S_Looping in the "key" field and "1" in the "Value" field. Well, the "Value" field is where you put the name of the sound file, not a number. Am I missing something? I'm getting really pissed off.



rich_is_bored@Posted: Thu Aug 12, 2004 11:40 pm :
It should be as simple as placing a speaker in your map, going to the entity tab of the inspector, clicking the sound button, selecting a sound, and pressing okay.



Crevalle@Posted: Thu Aug 12, 2004 11:43 pm :
That works for a single sound, not looping. I'm looking to loop.



rich_is_bored@Posted: Fri Aug 13, 2004 12:06 am :
If the sound plays in the preview but does not in game it's because you need to set the key/value pair s_waitfortrigger to 0. Don't ask why I dunno. It should be 0 by default but I guess not.

The key/value pair s_looping works. I just tested it with sound/ambient/loop_rumble_01.wav



Crevalle@Posted: Fri Aug 13, 2004 12:20 am :
Rich, that is exactly the .wav file I am attempting to loop. What I've been doing is:

- Insert speaker
- Go to "entity" tab
- click "sound"
- select "loop_rumble01.wav"
- In the "Key" field I type "s_looping"
- I leave the "Val" field the way it is (with sound/ambient/loop_rumble01.wav)
- Then I BSP and run the map

The sound plays through once, then stops. I'm missing something aren't I?



rich_is_bored@Posted: Fri Aug 13, 2004 12:41 am :
I did almost the exact same thing...

- Insert speaker
- Go to "entity" tab
- click "sound"
- select "loop_rumble01.wav"
- In the "Key" field I type "s_looping"
- I set the "Val" field to 1.
- In the "Key" field I type "s_waitfortrigger"
- I set the "Val" field to 0.
- Then I BSP and run the map



Crevalle@Posted: Fri Aug 13, 2004 12:58 am :
You're losing me man. Where do you see two "Key" fields and two "Val" fields? I only see one of each. Do you have a screenshot of what you mean?

Are you saying you over-write the "loop_rumble01.wav" with "1"?

I hate to be a bother, but I feel that I'm on the cusp of understanding you.

Do you ever hit that "X" by the "Val" line? Or "Create?"



rich_is_bored@Posted: Fri Aug 13, 2004 6:58 am :
You're having trouble with Key/Value pairs so this is the simplest way I can explain it...

I start with a speaker in the map and goto the entity tab in the inspector. I type in the name of the key I'd like to add in the key field and the value in the value field. Now pay attetion to the highlighted part of this picture...

Image

When I press enter, the key/value pair is added to the list. At this point I can type new values in the key and value textboxes.

Image

So, I repeat the process for the next Key/Value pair overwritting the textboxes with new information, press enter and again...

Image

... a new Key/Value pair shows up in the list.

Now, keep in mind that the Curve, Model, Sound, Skin, Gui and Particle buttons also add keys to the list. In a sense they are just shortcuts that do the same thing. So when I add a sound using the button it will look like this...

Image

And I could have got the same result if I typed those values in the key and value textboxes and pressed enter.

As you can see it also doesn't matter what order you add the key/value pairs.



Crevalle@Posted: Fri Aug 13, 2004 2:37 pm :
Perfect tutorial man! Thanks--works like a charm. I was never pressing enter, either. Thanks again!



DumpTruck@Posted: Fri Aug 13, 2004 6:20 pm :
OT but Rich - how did you get your windows to look like that? Is that Windowshade?



kabe69@Posted: Sat Aug 14, 2004 1:42 am :
i dont wanna make a new topic inless i have to but maybe some one can answer this.
im makeing a unreal turnament type MP map for D3,
but wanna have music, but very low music, and i want it all over the map...
posible or no?



Eutectic@Posted: Mon Aug 23, 2004 1:22 am :
Rich, if I may make a suggestion...
Here's a tip to save you a bit of typing :

Instead of typing the Key name in the "Key" field from scratch every time, you can simply double-click on the Key name in the upper portion of the window. This will automatically fill in the Key field with the key name.

You still have to fill in the Key value manually of course :)