Forum rules - please read before posting.

Access Journal via code

Hi There,

Can you advise as to where I can access the journal pages via code. 
I believe they are stored in playermenus.cs?
I need to access the content of the diary page via an id.

Thanks

Nic

Comments

  • It's in MenuJournal.cs, but accessed through PlayerMenus.

    PlayerMenus.GetElementWithName ("MyMenu", "MyJournal");

    However, that will return a MenuElement class (the base class), so you'll need to cast it:

    MenuJournal theJournal = null;
    MenuElement theElement = PlayerMenus.GetElementWithName ("MyMenu", "MyJournal");
    theJournal = (MenuJournal) theElement;

    Now you can access the journal's pages, which are in it's pages variable.

    JournalPage[] pages = theJournal.pages.ToArray ();
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.