Frictional Games Forum (read-only)

Full Version: Unlock door when you read Note
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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
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
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=WfgFEG4TS...er&list=UL
Thank you Kyle You're a big Help (:

-GreyFox