Forum rules - please read before posting.

Shift inventory to the last item?

edited November 2015 in Technical Q&A

 I've  made my 2 pages inventory Diary/Journal.(
each with single slot)

And add pages .png files with text and some art to the pages inventory
accordingly when I play the game .

It all works fine.



 However is there an option or a way to shift inventory right to the last
item automatically when I open my diary?

So when I pick new pages and open my diary my 2 page inventories with a single slot each, would shift right to the last items (pages).

Mind you that it should not affect the normal items inventory, where we send intractable
items that we use on other objects.

This seems to escape me. Any ideas ?

Thanks

Comments

  • edited November 2015
    You can control which page is "open" by writing a custom Action that controls the journal's showPage variable:

    AC.MenuElement myElement = AC.PlayerMenus.GetElementWithName ("MyMenu", "MyJournal");
    AC.MenuJournal myJournal = (AC.MenuJournal) myElement;
    myJournal.showPage = myJournal.numPages;

  • edited November 2015
    Hmm.. thanks.
    But my journal is not journal based. It's inventory based journal/diary.
    So each page is an item that I pick up and send to my single slot invetory of my inventory based journal/diary.

    Besides how would I call the last item/page of my inventory based diary? Since my single item inventory would incrementally increase by 1 each time I pick a new item.
  • So you want the same thing but for an inventory box instead, right?  You can use the Shift function instead.

    AC.MenuElement myElement = AC.PlayerMenus.GetElementWithName ("MyMenu", "MyJournal");
    AC.MenuInventoryBox myJournal = (AC.MenuInventoryBox) myJournal;
    myJournal.Shift (AC_ShiftInventory.ShiftRight, 100);

  • Thank you. I'll try this.
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.