![]() |
[SCRIPT] How to achieve this scenario? - 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] How to achieve this scenario? (/thread-20106.html) Pages:
1
2
|
RE: How to achieve this scenario? - The chaser - 02-01-2013 (02-01-2013, 04:09 AM)serbusfish Wrote: Thanks for being patient with me, but something is still wrong because I pasted that exact code and the game throws up an error message saying 'ERR - expected '('. There, fixed it. RE: How to achieve this scenario? - serbusfish - 02-01-2013 With your version it gives me the error 'Unexpected end of file', any ideas? Even to this n00b your code looks right. EDIT: Fixed it! The tinderbox line was missing a ". Im getting closer, now I need to try and make the camera look ![]() RE: How to achieve this scenario? - Kreekakon - 02-01-2013 (02-01-2013, 05:04 PM)serbusfish Wrote: With your version it gives me the error 'Unexpected end of file', any ideas? Even to this n00b your code looks right. That probably means that one of the brackets in the code is out of place. Go check to see if all of them all have proper corresponding ones. Notepad++ thankfully makes this extremely easy. RE: How to achieve this scenario? - serbusfish - 02-03-2013 Well so far so good, I managed to make it so the pot breaks, the player looks, a monster growls, and a few secs later a door shuts. (I changed the monster walk to a growl as you couldnt hear the footsteps over the background music). Now, sorry to be a pain again but rather than make another thread I was wondering if one of you kind gents could help me make a lever open a locked door? Does it have anything to do with this command?: Code: void SetEntityConnectionStateChangeCallback(string& asName, string& asCallback); I am getting more used to the scripting enviroment, but im not sure in this particular instance how you link the lever to the door I want opened? RE: How to achieve this scenario? - The chaser - 02-03-2013 Oh, just: void OnStart() { SetEntityConnectionStateChangeCallback("Lever", "Call"); } void Call (string &in asEntity, int alState) { SetSwingDoorLocked("Door", false, true); } RE: How to achieve this scenario? - serbusfish - 02-05-2013 (02-03-2013, 11:54 AM)The chaser Wrote: Oh, just: Thank you i'll give it a try ![]() RE: How to achieve this scenario? - serbusfish - 02-08-2013 Update, I must be doing something wrong because the game wont load, here is what ive got: Code: void OnStart() What did I do? RE: How to achieve this scenario? - FlawlessHappiness - 02-08-2013 What exactly is it you want with this line: "if(ScriptDebugOn())"? It isn't used in any way, and it is probably the one that crashed the game. RE: How to achieve this scenario? - serbusfish - 02-08-2013 (02-08-2013, 06:45 AM)BeeKayK Wrote: What exactly is it you want with this line: "if(ScriptDebugOn())"? I dont know it was included in the tutorial script. I'll remove it and see what happens, but apart from that does my script look ok? RE: How to achieve this scenario? - FlawlessHappiness - 02-08-2013 Yea it doesn't look like there should be any problems if you delete the line i specified. |