Frictional Games Forum (read-only)

Full Version: Script Box help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was curious on how to add sounds to play at certain areas like when you walk into a script box, basically so i can use a walking sound to make it sound like something is walking right behind you but each time you look nothing is there. if someone can show me how to make sounds activated by the box that would be great Smile
Check out this site. http://wiki.frictionalgames.com/hpl2/amn..._functions
It might help you.

And for simple scripting, try watch some tutorials
Simply:

AddEntityCollideCallback("Player", "Area", "Sound", true, 1);

void Sound (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Sound.snt", "SoundArea", 0.1, true);
}
Thanks beecake ill be sure to check that out, and thanks chaser for the help as well (:
void OnStart()

{
AddEntityCollideCallback("Player", "foot7", "step7", true, 1);

}

void Sound (string &in asParent, string &in asChild, int alState)

{
PlaySoundAtEntity("", "step_walk_wood.snt", "step7", 0.1, true);
}

NOTE; my script area is called foot7
my Sound name is step7

i RE ran the script using a differnt sound, what is happening is sound just gets activated befor i am even close to the script area, any reasons why?
Did you accidently place a sound-entity inside the level editor?