Frictional Games Forum (read-only)
Memento when trying to open a door - 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: Memento when trying to open a door (/thread-10826.html)



Memento when trying to open a door - FreshKorruption - 10-17-2011

What is the hps and extra_english.lang scripting required to make a memento when you try to open a locked door.


RE: Memento when trying to open a door - Statyk - 10-17-2011

try this... but add your info. And make sure the door is locked in the level editor!

NOTE! Anything capitalized, add your own details. and when it says "J_QUEST NAME", keep the J in there. It helps separate it from the .hps, at least what i do =P

//________________________
void OnStart()
{
SetEntityPlayerInteractCallback("LOCKED_LEVELDOORNAME", "Adddoorquest", true);
}

void Adddoorquest(string &in asEntity)
{
AddQuest("QUEST_NAME", "J_QUEST_NAME");
//asNameAndTextEntry - entry in the .lang file. Must start with "Quest_J_QUESTNAME_Name" / "Quest_J_QUESTNAME_Text", and be in CATEGORY “Journal”!
}

//____________________________________


In extra_english.lang:

<CATEGORY Name="Journal">
<Entry Name="Quest_J_QUESTNAME_Name">title of your quest! yadda yadaa!</Entry>
<Entry Name="Quest_J_QUESTNAME_Text">This is what's put in your momento, blah blah!</Entry>
</CATEGORY>

//____________________________________


Let me know if it works!