Frictional Games Forum (read-only)
[SCRIPT] a function for opening notes? - 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] a function for opening notes? (/thread-17240.html)



a function for opening notes? - PixelHurricane - 07-24-2012

Is there a way you can open a journal using a code?
I basically want it to work as when you spawn you automatically read a note as a kind of intro/hint


RE: a function for opening notes? - Elven - 07-24-2012

For that you maybe should use the Custom Story description Tongue?

Answer might be there tho: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Ill paste it for ya, maybe u can somehow get it displayed with these codes, not sure tho!

Code:
Journal

void AddNote(string& asNameAndTextEntry, string& asImage);


Adds a note to the player's journal.



asNameAndTextEntry - entries in the .lang file. Must end with _Name and _Text and be in category “Journal”!


asImage - the background image to be used

void AddDiary(string& asNameAndTextEntry, string& asImage);


Adds a diary to the player's journal.



asNameAndTextEntry - entries in the .lang file. Must end with
_NameX and _TextY whereas X and Y are numbers of the parts (_Name1:
first diary, _Text1: first page) and be in category “Journal”!


asImage - the background image to be used

void ReturnOpenJournal(bool abOpenJournal);


Only called in the pickup diary callback! If true the journal displays the entry else not.