Frictional Games Forum (read-only)
Unlock door when you read Note - 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: Unlock door when you read Note (/thread-9561.html)



Unlock door when you read Note - GreyFox - 08-02-2011

Hello I'm trying to make it where you have to read a note so you can unlock a door (just so you get the full atmosphere) And I'm not quite sure how to do it, I tried before but it just didn't work.

Door Name= Trial1
Note Name= Note01
Note Text = Note01


P.S How Do you make it so you boost your sanity. I Can make it go lower but not higher (It just doesn't work) right now I have a cheap way of doing it (Complete objective, Potion spawns in Main Room Lol)

Please Help Thank you
-GreyFox


RE: Unlock door when you read Note - Kyle - 08-02-2011

Code:
void OnStart()
{
     SetEntityPlayerInteractCallback("Note01", "Func01", true);
}
void Func01(string &in asEntity)
{
     //AddUseItemCallback for unlocking it with item or whatever
     //If above comment is not what you're looking for, put SetSwingDoorLocked("Trail1, false, true); and some sound effect...
}

GiveSanityBoost(); = Normal boost.
GiveSanityBoostSmall(); = Small boost.

I hope this helps. Smile


RE: Unlock door when you read Note - GreyFox - 08-02-2011

Thank you but wouldnt SetSwindDoorLocked Lock the door? Lol, Also For the GiveSanityBoost I Don't Put anything in the Brackets?

And I Know I already asked a couple questions, but How do I do the quest thing? I Looked in the script functions page and was confused at this one line

asNameAndTextEntry - entry in the .lang file. Must start with “Questfckg_QUOT_, end with _fckg_QUOTText”, and be in category “Journal”!

What does that mean? I understand that I have to use my Extra_English.lang file and its category is "Journal" but what does the rest mean!?

Thank you
-GreyFox


RE: Unlock door when you read Note - Kyle - 08-02-2011

SetSwingDoorLocked("DoorName", false, true);

The "false" makes it become unlocked. Tongue

You don't put anything between the brackets.

http://www.youtube.com/watch?v=WfgFEG4TSCE&feature=mfu_in_order&list=UL


RE: Unlock door when you read Note - GreyFox - 08-02-2011

Thank you Kyle You're a big Help (:

-GreyFox