This is just an example of how to check for a specific footstep - in this case the second one. You don't need this line, or can change it to a different footstep. Why? well you might want to lower player sanity or shut a door or something on a given step.
Quote:So for this bit, would I have to create 10 'areas' named step1, step2 etc which the function would call each at 0.8 seconds? And for the bit i put in bold, what is that??
that function is of the following form:
//From the script functions page in the wiki:
void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
//The code used
PlaySoundAtEntity("scary"+asTimer, "scare_wood_creak_mix.snt", "StartFootstepsArea", 0, false);
The first argument is just a name to give the sound you are playing - it is given the name "scarystepX" (where X is a number between 1 and 10) in this case - so each sound is uniquely named. The next argument is the sound you want to play.
asEntity, is the place to play the footstep at - and set to "StartFootstepsArea". This means you only need one script area called "StartFootstepsArea". The last two arguments state a fade-in time (of 0) and whether the state of the sound should be saved.
However, if you want to make it so you have 10 areas - one for each footstep, you can simply do the following:
PlaySoundAtEntity("scary"+asTimer, "scare_wood_creak_mix.snt", "Foot"+asTimer, 0, false);
"Foot"+asTimer will yeild "Footstep1" through "Footstep10" as the entity names.