Forum rules - please read before posting.

Same container across scenes

Hi everyone!


I hope you can help me out with something that’s been driving me nuts for a while.

I had this plan to have a bird in the game that would carry inventory objects from one character to another across scenes. I knew the manual said containers where scene based, but I thought it meant if I had it inside both scenes and shared the prefab and had the remember Container, it would work across both scenes. In fact, I thought it did since It worked while playing it in Unity, But now I’ve seen it doesn’t work at all when playing the game, saving, exiting the game and loading back a game save. It makes crucial items dissapear :(



Is there any work-around any of you have found to do this or it’s an inpossible thing? Is it just me doing something wrong? 


Thanks again for your help!


G

image

Comments

  • In which AC and Unity versions?

    How exactly does the mechanic work?  Is the bird moving just a cutscene, and items are transferred between players automatically, or do you have to search the bird's bag specifically to get the items?  How is the Container present in each scene - spawned at runtime, or is a dedicated prefab placed manually in each scene file?

    Essentially, I'm in need of steps to be able to recreate the issue.  While I haven't experience of using Containers in the way that you appear to be, I don't think there should be a problem with it in principle.  However, I do need to know more detail about how this mechanic / setup works so that I can experience the problem for myself.

    If you've updated to the latest release and it's still occuring, the easiest way to do this would be to duplicate the project, make two new test scenes that can easily demonstrate the problem, scrap *everything* unrelated (including music, graphics, animation assets), and then PM me a .unitypackage file.

    When opening the Container after loading, what exactly is the issue?  Does it show no items, or do the items that were present before the loading not change?
  • Hi Chris,
    I'm still on AC v1.62.6 (I wanted to update soon, sorry! - I'm a bit limited on internet this month- and I looked through the notes and didn't find anything about containers)  I'm on Unity 2018.1.0of2.

    At first, before realizing it was a problem, I had the container only as a prefab. But when i saw it wasn't working I tried all, having it on one scene, both scenes and spawning it through add object.

    The concept is opening the bird container with one player, leaving objects inside the container. No Player transfer in this one. The bird stays there and then by switching players, calling the bird somewhere else and opening the container in another scene. However, when opening the container in another scene, the items are gone.  Its almost like it's creating a new container. Having the prefab makes the items disappear from the container in one scene when saving and loading. Having the container present in the scene fixes this problem, but only on one scene, when opening the container in another scene, it feels like it creates a new one, regardless of being on this scene or prefab.

    Hope that makes more sense

    I will update ASAP and if the error persists I will duplicate it as you say.

    Thanks Chris

    G

  • I hadn't noticed this thread before, but this sounds very similar (if not identical) to what I'm also trying to do - which is to have a Container persist throughout the whole game

    I'm on the latest version of AC, and have tried most of the obvious ways of implementing it, with no luck so far

    However, Chris made a suggestion (in my "Global Container" thread) about somehow refreshing the Container at certain points in the game, and I'm hopeful he may come up with some AC magic to solve the problem. It's quite a common game mechanic, so I think it would be a useful feature to have in AC
  • Indeed - see my suggestion here.
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.