How do I make my function parameter work correctly globally?

0 favourites
  • 2 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • I have an inventory system that calls the "item" parameter and everything mostly works as it should. However when I move to another layout the inventory doesn't carry over.

    The spots the items were in are saved, meaning any items I pick up in the second room won't be placed in parts of the inventory that had items in the previous layout. When I return to the original layout the items return to where they were, and vice versa.

    The key actually does stay, but that's only because transitioning rooms removes it from the array, but not the inventory screen. So it is overwritten. That's another little bug if anyone else knows something about that too haha.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would anticipate some logic such as when you open the inventory, spawn the icon that is array.at(0) in slot 1 and array.at(1) in slot 2 etc. That way it is always matching what is in the array. You need to create logic to keep the visual inventory matching what's stored in the array.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)