Forum rules - please read before posting.

Items saved in inventory after leaving scene?

Hello, first post here, i want to appraisal the work you did in AC and im happy with it.
The thing it bothers me is that i dont know how to save inventory items, i looked around the net and i see response like Remember Visibility and remmber Hotspot, but what about Remember Item. When i exit scene with item and return back to scene everything restart.

How can i save my inventory list while leaving scenes. 
Thank you. 

Comments

  • Welcome to the forum, @AndrejSoldo

    Remember scripts are only necessary for scene objects - Inventory items, like Global Variables, are automatically saved for you.  What exactly is restarting when you return to the scene?  Any items you're carrying should transfer from one scene to the next.
  • Maybe what happened to me will help. I had something quite similar. When I was switching from my first scene to other scenes my inventory items were disappearing.

    As it was happening just between first scene to others and not between others, I wondered what was the difference. And the only one is that I included my player prefab in my first scene because I wanted to change something without impacting the rest of the scenes.

    So I noticed that to avoid this problem, I have to include my player in every scenes or in no scenes at all (so just add the reference in the settings).
  • Ok, here is what happens.

    1. i put graphics for my item in scene.
    2. then i put hotspot and done all little things that it add to inventory, disappear icon from scene when click on it.

    but when i go out from the scene, my inventory is empty and when i return, everything is the same(restarted level).

    situation is that i cant go with item throug scenes and return back to start scene without losing that item.


  • And you're using the latest version?  On what platform, and version of Unity?

    Have you placed down the appropriate Remember scripts?  As you haven't described what exactly is re-setting, I can't be more specific than that.  But your Inventory should not be losing any items - unless your situation is as @Gog0 describes (a bug that I will try to fix now that I'm aware of).

    Any screenshots you can post would help immensely.
  • Here, im using Unity 4.6.3f and 1.45 AC.




    First image show that there is hotspot called ROPE and everything to add in inventory. secon image is rope in my inventory in the same scene, third image is next scene but without item rope. 

    Ask for things to post, do you need some ActionLists?
  • Windows 7 Home Premium...
  • The first shot only shows the Inventory item - I can't see anything to do with the Hotspot.  Please post a shot of the full Hotspot object's Inspector, and any relevant ActionLists.

    Since you're using a custom Inventory Menu, I also want to rule out this being due to your UI.  Switch your Menu Manager asset file to Demo_MenuManager (the demo game's one) and let me know if the problem still occurs.
  • http://s24.postimg.org/4z6bnddfp/image.jpg


    and Demo2d Manager is on default, i didnt make new manager, im using Demo2d manager all the time... everything else has custom managers, except MenuManager. maybe thats the problem? O.o
  • You mean you're editing the Demo2D Managers?  You should instead use the New Game Wizard (available on the top toolbar, under Adventure Creator -> Getting started).  This will create a new set of Managers that you can safely edit, which won't be overwritten when you update AC.  The start of this tutorial covers the process.  But either way, revert your Menu Manager to Demo_MenuManager and let me know if the problem with the inventory is still there,

    As for your scene objects, you will need to add appropriate Remember scripts to your scene - add the RememberHotspot script to your Rope Hotspot, and the RememberVisibilty to your "curtain_closed_1024" sprite.  This will tell AC to save these things for the next time you return to the scene.  The same video above covers the principles behind this at the 1:24:24 mark.
  • Thank you for your time and replys, I created a new MenuManager and when i exit the scene it remembers the item thats in inventory, I dont know why demo2d manager didnt save it.
    I use demo2d menu manager just because i wasnt sure in creating my own menu in that time, so i use default and just rearange.

    I will rearange and make a new inventory with new menu manager and it will work, coz i just made a test.

    Once again, great job and thank you for help.
    Andrej Soldo
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.