Need help with making scripts - Amnesia CS !! - 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: Need help with making scripts - Amnesia CS !! (/thread-11499.html) Pages:
1
2
|
Need help with making scripts - Amnesia CS !! - BesTCracK - 11-25-2011 Well guys I would really enjoy some help from this community on how to make scripts in Amnesia. Well I watched many tutorials and did exactly what they do but still it doesnt work I just pass script area and nothing happens. I checked if is everything correct and yes it is so I would really enjoy some help from you guys because Im making an epic custom story but without scripts it sucks you know Anyway thanks for any answers you will give me RE: Need help with making scripts - Amnesia CS !! - Unearthlybrutal - 11-25-2011 http://wiki.frictionalgames.com/hpl2/tutorials/start Seen this? Would be helpful RE: Need help with making scripts - Amnesia CS !! - BesTCracK - 11-25-2011 Yes I seen that , even engine scripts too but still cant imagine how that works RE: Need help with making scripts - Amnesia CS !! - Your Computer - 11-25-2011 AddEntityCollideCallback() RE: Need help with making scripts - Amnesia CS !! - flamez3 - 11-26-2011 If Your computer's suggestion doesn't work; maybe post the script for us? RE: Need help with making scripts - Amnesia CS !! - BesTCracK - 11-26-2011 To be honest I watched many tutorials but Your Computer's is really different than all other and I really dont understand it ... I got something with the lever but I try to post the script here so give me some time RE: Need help with making scripts - Amnesia CS !! - BesTCracK - 11-26-2011 void OnStart() { SetEntityPlayerInteractCallback("lantern_1", "Scare1", true); } void OnEnter() { } void OnLeave() { } void Scare1(string &in asEntity) { SetEntityActive("servant_grunt_1", true) AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "Idle") AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle") AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle") SetEntityActive("servant_grunt_1", false) } THERE IT IS ! This is what I have exactly in the script file and still it doesnt work (( RE: Need help with making scripts - Amnesia CS !! - flamez3 - 11-26-2011 (11-26-2011, 01:59 PM)BesTCracK Wrote: void OnStart()You need to put a ; after the end of every line in a function block And your putting your commands down thinking they will only play after the one above has done its thing. That's not how it works with Angelscript. It will do everything at once. For the servant to deactive after all that stuff has happened (him going to the pathnodes etc) you need to add a timer, like this: AddTimer("internalnameofthistimer", howlonguntiltimerdoesitswork, "nameofthetimertolinkto"); (I know its hard to understand by the way i set it out ^^) You put that in the Scare 1 function block, than put this anywhere but the void Onstart place or any other function blocks: void nameoftimer(string &in asTimer) { SetEntityActive("servant_grunt_1", false); } Hope that helps RE: Need help with making scripts - Amnesia CS !! - BesTCracK - 11-26-2011 void OnStart() { SetEntityPlayerInteractCallback("lantern_1", "Scare1", true); } void Scare1(string &in asEntity) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "Idle"); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle"); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle"); } void OnEnter() { } void OnLeave() { } Man I understand you what you mean by the timer got it but please can you be so helpful and copy this what i have put right now and repair every mistake i have got here ? I would be so thankful to you if i get it working RE: Need help with making scripts - Amnesia CS !! - BesTCracK - 11-26-2011 Well anyone who can help me ? OMG GOD YEAH !!!! FFS !!!! flamez3 I WANNA FUCK YOU !!!! IT WORKS !!!! Thanks EVERYONE helping me figure it out !! Im going to work on my custom story |