Homework 1 - Frequently Asked Questions

[Note questions are added in reverse order, so the newest ones are at the top.]


Q: I forgot how to make a trigger.  It doesn't seem to be one of the entities.

A: You create a brush, texture it as a trigger, and then do the tie to entity menu command which lets you choose which trigger.


Q: How do I change the wall texture?

A: See the sample in the tutorial, here, which shows how to apply a texture to an entire brush using the apply current texture tool.

If you want to just change a single face of a brush, then use the face edit tool:  Here is a description of the face edit tool.


Q: Tell me about sounds.

A: There are two ways. One, you simply put in the path to the sound in Faceposer and use the sound directly. One thing that you should do is choose a directory name that has your own name in it or something unique, just to make things easier to organize. In any case, you can reference the sound directly. This is easier, but does not let you control the volume of the sound. That means that you must record it properly and/or adjust with audacity so it is correct. We used this technique effectively in the dragon movie. The real pain in using this technique is that you have to type in the file name with directory information and the .wav on the end and get it completely correct. Ross's tutorials use the second technique which is to create your own scripted sound description file. If you want to be able to control the volume in faceposer, then you need to do more work and create your own sound description files for the system to do. Here is how you do that:

To do this, you must edit the games_sound_manifest.txt file in the scripts folder.  You need to add a line that loads in your sound files.  The line should look like:

"precache_file"        "scripts/youruniquedirectoryname/scriptedSounds.txt"

So, create your own script file which references all of your wav files.  The scriptedSounds.txt file (or whatever you call it) will have several soundscript entries that looks something like:

"npc_janeDoe.speech"
{
    "channel"       "CHAN_VOICE"
    "volume"        "VOL_NORM"
    "pitch"         "PITCH_NORM"
    "soundlevel"    "SNDLVL_NORM"

    "wave"          "*directory/npc_janeDoe_speech.wav"
}

Here is a link to the documents on sound scripts.

NOTE for this assignment, if you only have a very small number of dialog lines, then just use the wav file names.


Q: Do I Have to use the sound script stuff?

A: No, it is only necessary if you are using your own mod.  If you just use HL2, then it should work ok to just reference the file name.


Q: I can't find the scripts files.

A:

By default, Half Life 2 doesn't have a scripts directory since all that data is stored in the main .gcf.

 

So just make a new directory and a new game_sounds_manifest.txt at the following location:

<path_to_Steam>\Steam\steamapps\<your_login>\half-life 2 episode 2\ep2\scripts\