Wrong script!Why!? - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Wrong script!Why!? (/thread-6059.html) |
Wrong script!Why!? - Janni1234 - 01-05-2011 My scripting file: void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false); } void OnEnter() { AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1); PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false); } void scare1(string &in asParent , string &in asChild , int alState) { PlaySoundAtEntity("", "04_hole_squeal.snt", "candlestick_floor_1", 0, false); RE: Wrong script!Why!? - ModManDann - 01-05-2011 you forgot } on the end. Might be helpfull if you also post the error report you are getting. RE: Wrong script!Why!? - DIGI Byte - 01-05-2011 (01-05-2011, 10:59 AM)ModManDann Wrote: you forgot } on the end. also he's not using this correctly; void scare1(string &in asParent , string &in asChild , int alState) should be something like void scare1(string &in asParent) I'm not in the mood to look up the proper use and syntax RE: Wrong script!Why!? - Janni1234 - 01-05-2011 Okay Thanks! But whats wrong with that?: } void guardian1(string &in asParent , string &in asChild , int alState) { PlaySoundAtEntity("", "guardian_distant3.snt", "storage_box_wood02_1", 0, false); } Is that right!?scripting - Janni1234 - 01-05-2011 void OnStart() { PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false); } void OnEnter() { AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1); PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false); AddEntityCollideCallback("player", "guardian_1", "guardian1", true, 1); } void scare1(string &in asParent , string &in asChild , int alState) { PlaySoundAtEntity("", "04_break02.snt", "candlestick_floor_1", 0, false); PlaySoundAtEntity("", "scare_male_terrified_4.snt", "candlestick_floor_1", 0, false); } void guardian1(string &in asParent , string &in asChild , int alState) { PlaySoundAtEntity("", "guardian_distant.snt", "Player", 0, false); PlaySoundAtEntity("", "guardian_idle.snt", "Player", 0, false); RE: Is that right!?scripting - jens - 01-05-2011 Don't make a new thread for the same thing, use your old thread. you are missing a } at the end again. RE: Wrong script!Why!? - Mofo - 01-05-2011 void OnStart() { AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1); AddEntityCollideCallback("Player", "guardian_1", "guardian1", true, 1); } void OnEnter() { PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false); } void scare1(string &in asParent , string &in asChild , int alState) { AddDebugMessage("scare1", false); PlaySoundAtEntity("scaresound1", "04_break02.snt", "candlestick_floor_1", 0, false); PlaySoundAtEntity("scaresound2", "scare_male_terrified.snt", "candlestick_floor_1", 0, false); } void guardian1(string &in asParent , string &in asChild , int alState) { AddDebugMessage("guardian1", false); PlaySoundAtEntity("guardiansound1", "guardian_distant.snt", "Player", 0, false); PlaySoundAtEntity("guardiansound2", "guardian_idle.snt", "Player", 0, false); } There. That should work. RE: Wrong script!Why!? - Janni1234 - 01-05-2011 @Jens : okay sorry @Mofo:Thanks man! And yes right!Thanks. RE: Wrong script!Why!? - Janni1234 - 01-05-2011 I`ve tried a new map. void OnStart() { AddEntityCollideCallback("Player", "area_scare_1", "areascare1", true, 1); PlayMusic("12_amb.ogg"), true, 0.7f, 1, 0, false); } void OnEnter() { PlayMusic("12_amb.ogg"), true, 0.7f, 1, 0, false); } void areascare1(string &in asParent , string &in asChild , int alState) { PlaySoundAtEntity("Player", "04_hole_squeal.snt", "candle_floor_1", 0, false); } Are there any mistakes!? RE: Wrong script!Why!? - Akumasama - 01-05-2011 You should also post the error message you're getting. I'm not sure what's wrong right now so yeah... |