Issue with using Inventory Array

0 favourites
  • 2 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Hey everyone!

    I tried to look up some better ways of doing this, or something that would help me out ,and wasn't able to.

    I've been using Encrypted Cow's tutorial here: ... g-an-array

    To create an inventory, and I'm using it pretty much exactly as he has it which you can see here:

    However, I don't want to have to right click on an item to get rid of it, etc, I want to be able to use multiple items at once to create a new item.

    For example, the player needs to make a apple pie, but needs pie crust, apples and sugar to do so.

    Say Pie Crust is itemID # 20, Sugar is itemID #15 and Apples are itemID #2 while the actual PIE itself is itemID #3

    Is there a way in events to essentially say if the player has ItemID 20, 15, and 2 that they can then receive the Pie, Item ID #3? And have those 3 items vanish from the inventory, and have only the pie left?

    If anyone can help me understand this a bit better, I'd really appreciate it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll need to provide the .capx that contains this issue. That would make it easier to help you. However one suggestion I would like to make is that you model your Item Combining after Wndows Explorer file selection. So you would need a Select Item Group of Events that would handle the case where you would be pressing Ctrl and Left Clicking. This could result in the Inventory that was clicked to get highlighted. Thus in the game you could repeatedly select more items, then have a Combine Items Group of Event that would trigger on a Right Click if the number of Selected Items is greater than 0. Then somehow that event group would determine what item should be created based on the Selected Items and then have the Selected Items destroyed. This is just one example. A better would be to have a Recipe that you choose to make an item from and it would automatically check to see if you have all the necessary Items and then destroy/create the appropriate Items.

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