[SCRIPT] Script Box help - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Script Box help (/thread-19442.html) |
Script Box help - liquiddr3amz - 12-04-2012 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 RE: Script Box help - FlawlessHappiness - 12-04-2012 Check out this site. http://wiki.frictionalgames.com/hpl2/amnesia/script_functions It might help you. And for simple scripting, try watch some tutorials RE: Script Box help - The chaser - 12-04-2012 Simply: AddEntityCollideCallback("Player", "Area", "Sound", true, 1); void Sound (string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "Sound.snt", "SoundArea", 0.1, true); } RE: Script Box help - liquiddr3amz - 12-04-2012 Thanks beecake ill be sure to check that out, and thanks chaser for the help as well (: RE: Script Box help - liquiddr3amz - 12-06-2012 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? RE: Script Box help - FlawlessHappiness - 12-06-2012 Did you accidently place a sound-entity inside the level editor? |