Custom Story Error - 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: Custom Story Error (/thread-24910.html) Pages:
1
2
|
Custom Story Error - Hungerzz - 03-23-2014 Hello guys,can you show me how to fix this problem? Here is the script -------------------------------------------------------------------- 19 void AddEntityCollideCallback("PlayerStop", "", "SetPlayerActive", "", 1); 20 21 void SetPlayerActive(false); 22 { 23 StartPlayerLookAt("Grunt", 5.0f, 5.0f, "AddTimer"); 24 AddTimer("", 5.0f, "StartWalk"); 25 } 26 void StartWalk(string &in asTimer) 27 { 28 SetPlayerActive(true); 29 StopPlayerLookAt(); 30 } ------------------------------------------------------------------ And then this error shows up when i start the map : main(22,1) ERR: Unexpected token '{' ------------------------------------------------------- I'm trying to make player stop and look at monster for 5 seconds,and then walk again after 5 seconds. RE: Custom Story Error - 7heDubz - 03-23-2014 19 void AddEntityCollideCallback("PlayerStop", "", "SetPlayerActive", "", 1); 20 There are no braces here first of all. RE: Custom Story Error - Romulator - 03-23-2014 Actually; hold on, you have a few errors... Try This! PHP Code: void OnStart() See if it works after that (But if you already have an OnStart(), make sure to put the AddEntityCollideCallback inside of it) RE: Custom Story Error - Hungerzz - 03-23-2014 Romulator i did as you showed but it still shows me the same error. RE: Custom Story Error - Romulator - 03-23-2014 Updated! Sorry about that. RE: Custom Story Error - Hungerzz - 03-23-2014 Thanks so much Romulator! It started looking everything works fine! But there is still one problem.Player doesn't follow Grunt as it moves.What do i do? RE: Custom Story Error - Romulator - 03-23-2014 That one isn't tough, but can be a bit tedious to code. I'll take a look at Case Statements and get back to you on that in a sec When finished, I will pm you RE: Custom Story Error - Hungerzz - 03-23-2014 Thanks ! How do i +rep you? RE: Custom Story Error - 7heDubz - 03-23-2014 Leftmost + sign on the bottom left of his post RE: Custom Story Error - Romulator - 03-23-2014 Sent a PM. Done using a looping timer and localvars instead of case. Would make it a bit more complicated. My final code came out like this, however in more my favour than Hungerzz. Feel free to use it if you understand how it works! PHP Code: void OnStart() |