![]() |
Adding Mementos help? - 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: Adding Mementos help? (/thread-18482.html) |
Adding Mementos help? - taylor122002 - 09-24-2012 Hello everybody! I have a scripting question, and many more in the future, unless I can figure them out. But I need help right now on adding Mementos to the journal. A friend of mine is working on a scripting project, and they're on Chapter 5 of their project, and I haven't even started. Although, their scripting is different than mine. Anyways, I'm trying to actually make a custom story, with at least, well hoping, 3 chapters. And I just started, but I don't know how to add the mementos. Could someone help view my scripting I have and see what I did wrong? Or maybe it's just because I didn't add the other scripting area in which the "Quest" memento disappears, like as in you completed that quest. In my .lang file, I have this: <CATEGORY Name="Journal"> <Entry Name="Quest_NoticeQuest_Text">It's too dark, I better move low and fast</Entry> </CATEGORY> As the "Quest" area is named "Notice_Quest_Area". I don't think there is anything wrong with the .lang file, as I've had trouble in the past where if I mess up on the .lang file, I lose everything. That hasn't happened yet, so I think that's good.. Now the .hps file: //////////////////////////// // Run first time starting map void OnStart() { AddEntityCollideCallback("Player", "Notice_Quest_Area", "GetNoticeQuest", true, 1); } void GetNoticeQuest(string &in asEntity, int alState) { AddQuest("getnoticequest", "GetNoticeQuest"); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } I'm positive I did something wrong here, I tried watching a video of this, and the part where it says "AddQuest("getnoticequest", "GetNoticeQuest");", in the video they put down this function, except changed everything with their own stuff. "AddQuest("namequest", "NameQuest"); so I thought I'd do the same with me, except when I run into the quest area where you would get the memento, nothing happens. Sorry, I'm very new to this, so I don't understand what I'm supposed to do with this. I only know how to add journal entries and make keys unlock doors. Any help would be appreciated, and I thank everyone who replies in advanced! RE: Adding Mementos help? - Adny - 09-24-2012 Issue 1: The callback syntax for your function "GetNoticeQuest" isn't correct. You have: (string &in asEntity, int alState) when it should be: (string &in asParent, string &in asChild, int alState) Issue 2: This part: AddQuest("getnoticequest", "GetNoticeQuest"); isn't consistant with the .lang file; the name of the quest in the lang file is "NoticeQuest". Try this instead: AddQuest("noticequest", "NoticeQuest"); Issue 3: Make sure you only have 1 category named Journal, and not multiple (in the past I've seen people accidentally make multiple journal categories for different types of entries). Hope that helped! |