Using two inventories from different characters at once

  • #1, z OrlixMonday, 06. June 2016, 15:56 hodinky 9 years ago
    Hi guys,

    I need to have two inventories in the scene at the same time, one for the hero character and another to a secondary character.

    This secondary character just will appear in a specific scene after an action on an object, and will disappear after another action. I need to show his inventory dynamically.

    The idea behind this is to allow the hero to give objects, from his own inventory, to secondary character inventory and passing those objects from hero to secondary character.

    What have i done until now:

    - I have created the (secondary character) inventory interface, and selected in the "Interfaces" menu of the character. the inventory is working properly with regular test.

    - I´ve try to add the action "Show/Hide interface" in the beginning of the scene where the interaction between the characters starts, but i think this action is only applicable to the current character (hero) interfaces.

    - I´ve try to add the action "Set interface of a character" but then the inventory interface of secondary character is linked to the principal character and his inventory disappears.


    For now, i´m running out of ideas, any help will be highly appreciated smile

    Thank you
    Orlando

    Bažant

    20 Posts


  • #2, z sebastianMonday, 06. June 2016, 16:17 hodinky 9 years ago
    I think its not possible to display two different inventories from different characters simultaneous.

    Kapitán

    2346 Posts

  • #3, z OrlixMonday, 06. June 2016, 17:19 hodinky 9 years ago
    Oh seriously? roll
    Not even with additional scripting?

    Bažant

    20 Posts

  • #4, z sebastianMonday, 06. June 2016, 18:08 hodinky 9 years ago
    Depends... You could script an own system like grabbing the inventory content from char B via lua and display its content somehow...

    I would suggest to wait for a more qualified answer than from me grin

    Kapitán

    2346 Posts

  • #5, z MachtnixMonday, 06. June 2016, 21:22 hodinky 9 years ago
    I'm not sure: On the wiki exists a script to sort your items alphabetically or sort it "first in, last out" or s.th. like this I think. For that the script read out every item object and put them into a "stack" table. After sorting in the table the script puts the items back. Idea: Maybe a professional programmer (not me...) can put this items vice versa into two inventories with two stacks like this: get all items from inventar 1, put them on stack 1, hold inventory 1 (if possible), change the character with changing to inventar 2, put all items from 2, put it on stack 2, and so on... ;-) ;-) It's a rough draft thinking (in German: "in Kladde gedacht")...

    Kapitán

    1097 Posts

  • #6, z afrlmeMonday, 06. June 2016, 23:09 hodinky 9 years ago
    Not possible with the default inventory / interface system. If you wanted to do something like this, then it would require you to create at least one custom inventory interface yourself, which could probably be done in-editor without scripting, but would probably require a lot of work to get it working / looking nice. A mix of editor actions / buttons / animations & Lua would be the fastest solution, but even that would be a lot of work.

    Imperátor

    7285 Posts

  • #7, z OrlixWednesday, 08. June 2016, 11:32 hodinky 9 years ago
    Well, i´m able to put my hands on dirty fields smile

    But i was thinking, maybe if i could pick an object in one scene and drop the object in a specific location of another scene probably i got my problem solved.

    Is there a way (scripting or else) to do this?

    Best regards

    Bažant

    20 Posts

  • #8, z sebastianWednesday, 08. June 2016, 13:04 hodinky 9 years ago
    Thats the default usage of an inventory grin

    Other way would be to set a condition true when "picking up an item" and check on the destination scene if the condition is true

    Kapitán

    2346 Posts

  • #9, z OrlixWednesday, 08. June 2016, 13:20 hodinky 9 years ago
    I´m a newbie in Visionaire, sorry for the silly questions red

    But i´m trying to move an object from one scene to another, using the current character inventory. I pick the object in scene1 then i go to scene2 and i want to drop the object in a specific location (a table, also an object), and i´m not being able to do this.

    This object must exist in the scene also?
    What action should i use to drop the object from inventory to the table object?

    Thanks.

    Bažant

    20 Posts

  • #10, z sebastianWednesday, 08. June 2016, 13:33 hodinky 9 years ago
    Yeah you have to create the objects in both scenes and as an item.
    When using the object in scene A you add the item to your inventory and trigger a condition to hide the object in the scene.
    Then you can later in scene B use the item with the desired place to activate another condition which displays the object.
    Using these items in general could be done via verb interactions like in Monkey island 1 or dragging like in Monkey island 3

    Kapitán

    2346 Posts

  • #11, z OrlixWednesday, 08. June 2016, 14:30 hodinky 9 years ago
    Right, thank you Sebastian.
    Now i figure how to do that wink

    Bažant

    20 Posts