How do I back to layout getting all previous state?

0 favourites
  • 2 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • Hi

    Question is next:

    You are in game, walking across the jungle (layout 3 of 100 total), and two crazy monkeys start to throw you nuclear bananas In that moment you remember to have in your inventory a flamethrower, suitable for this situation. Press the button to show the inventory, which is composed of 34 objects.

    Options are:

    a) inventory is in a global layer. Every level would need the same layers structure for having all the objects from that global layer, causing memory costs.

    b) inventory is in a different layout, showing its content when "system - go to layout inventory".

    My option is b). But question is:

    To achieve the level keeps its exact state when you come back to jungle (every banana in the air, player and monkeys in the same point, and so on...) best solution is "system savegame/loadgame", or persist behavior in every single object, or is there any other way?

    I mean, I have actually varios types of inventory, and think about have all inventories as global in every layout/level increasing the object count extremely. I think its suitable for a HUD, but not for all objects in player's bag. Problem with keeping state doesnt exist if I use option a) instead of b), but option b) is cleaner and efficient, isnt' it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In brief:

    I need to keep all state like pause action would do, without getting all inventory objects invisible on each layout in game. Go to inventory layout, come back and all actions goes on from the exact point it stopped.

    Anybody help, please?

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