Forum rules - please read before posting.

Inventory problem!

So my game prototype is that the player should find some parts of the puppet for example: left shoe, a button, hand and a helmet. I want them to appear on the puppet once you have all the parts in the inventory, or you can manually place them on the puppet without an actual order. How can I do this properly easily! Chris if you need additional information I definetely can provide that. Thank you!


  • I will provide screenshots if necessary!

  • Yes, please share screenshots to illustrate the situation. Is the puppet a Hotspot in the scene, or part of a Menu?

    The Inventory: Check Action can be used to check if a particular item is in the Inventory - a series of them together can check if the player is holding all of the required items.

    If you create an ActionList that checks for all, you can run it whenever the Player picks up a piece by running the ActionList: Run Action after Inventory: Add or remove.

  • Yes the puppet is a Hotspot in the scene!
    So I'll try the method you said and I'll give you an update!

  • Thank you so much Chris!!

  • If you have some free time can you design me a simple visual node that checks for all of the inventory items: ex shoes,hand,button if so the objective is complete.

  • I dont quite understand the logic

  • Actions in a sequence - string together as many as you need, like this:

    here is my try! Is this any good?

  • I tried actionlist run in parallel

  • I don't know how to make the visual nodes work properly in my case. So I have this puppet object in the scene which has an idle anim let's say that the puppet is slowly breathing. Now when I pick an item that was found on the room for example it's helmet it automatically goes in the players inventory. And when the player interact with the puppet the helmet in the inventory is disabled and appear on the puppet actual head. This part with the object visibility i understand but when it comes of multiple objects all together shoes, hand, button helmet and if the player place them all to the puppet the objective shows complete... If someone can design me a simple visual code to understand better ^^ thank you
  • I tried several ways but didnt work

  • The Actions I posted involve checking that all items in the Player's Inventory are held simultaneously - the logic at the end is only run if all are carried.

    Running the Actions in parallel will cause the logic to be independent - each item is processed separately, without being affected by other items.

    From your description of the puzzle, though, it doesn't sound like either approach is necessary. Essentially, this is a "combine Item with Hotspot" puzzle, only you want to have multiple items and only consider the puzzle solved when all items have been used, right?

    What you'd first want to do is create individual Interactions for each Inventory item on the Hotspot, with each Interaction removing the item from the Player, and making that object visible on the pupper.

    Then, you'll need a way of keeping track of which body parts you've already added. This'll involve the use of Variables - use the Scene Manager to create a new "Variables" object (under the Logic section), and attach it to your pupper.

    If the Player can only find one of each item, the easiest approach is to create an Integer variable in this Variables component, named "Number of parts added". Then, inside each Interaction made earlier, use the Variable: Set Action to increase this Integer variable's value by 1. The idea being that when it reaches the number of body parts involved, the puzzle is solved.

    To check for this, create a new Cutscene that begins with a Variable: Check Action to work out if this variable has reached the intended value, e.g. 4 if there are 4 items to add. If this Action's condition is met, the puzzle has been solved and you can add any other Actions you want as a result of this.

    It's then just a case of running this Cutscene once each Interaction has run, which you can do with an ActionList: Run Action.

    If you haven't seen them yet, there are some resources to help get started with puzzle logic. The Interactions 101 tutorial series covers Hotspot interactions and Inventory combining, while the "Puzzle template: Simple examples" package on the Downloads page has a few example scenes covering common simple puzzle types.

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.