How can i separated script commands in Notepad++? - 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: How can i separated script commands in Notepad++? (/thread-19195.html) |
How can i separated script commands in Notepad++? - hecike3 - 11-12-2012 firstly . sorry for my bad english i m ,from hungary! second orry for the noob question ,but i am newbie! For example : i crated a script in 00_test.hps it looks like this : //////////////////////////// // Run first time starting map void OnStart(){ SetEntityCallbackFunc("key", "jump"); } void jump(string &in asEntity, string &in type) { SetEntityActive("pig",true); PlayGuiSound("21/21_scream10.ogg",1.0f); StartScreenShake(0.5f,2,0,0.25); } Now i want to add a new script . for example this : void OnStart() { AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1); } void func_slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("door2", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); }void OnStart() { AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1); } void func_slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("door2", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } But i've got an error and it sead " OnStart is the same and the parameters" Now what can i do and how can i debbuging this ? Please help me gusy! *-* RE: How can i separated script commands in Notepad++? - Statyk - 11-12-2012 You should only have 1 void OnStart(). Try this: Code: //////////////////////////// |