Inventory Array

This forum is currently in read-only mode.
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Been toiling with this for a couple days now. I found a couple other threads on inventories, but none that helped me with this inventory.

    http://www.mediafire.com/?k5zfd48m2t6w1g4

    Here's the .cap for both programs. Ama Object Creator saves arrays for objects that I want to load into a player's inventory, the other program, AmaProgram, is the one I'm having trouble with, which actually keeps track of player's inventories.

    I have two arrays set up, one's called ItemLoader, which I'm using to load arrays made by Ama Object Creator, the second is ItemList, which is the actual array of the current character's inventory.

    I also have InventoryHash, which is something I was trying after looking at an inventory tutorial, but couldn't get that to work either.

    Basically, I want my Add button to pull an array from the items folder, load it to ItemLoader, then move the information in ItemLoader into ItemList.

    The arrays are 50x wide, and ItemList is 50x wide and really tall, I want ItemLoader to file items into ItemList by y, so the first item takes up 1-50x, 1y; second takes up 1-50x, 2y; etc.

    And then I need "InventoryList", a listbox, to show every item in ItemList, and how many times it occurs.

    Whew, that's a lot of stuff. Thank you in advance to whomever has the will to cure my noobness :p

  • bump

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To load the array data you created you need a array object. Generally if you use a certain object to create a file only that type of object can read that file.

  • I'm loading it just fine, like I said, I have an array object named "ItemLoader" for the purpose of loading items.

    The problem is that I don't know how to sort things from ItemLoader into another Array, and then get construct to print the names and quantities of everything in that array.

  • :<

    Is this question too difficult? Am I not being clear enough on what I want? Am I asking too much?

    This is an important question, I can't keep working on my project if I can't make an inventory list.

  • :<

    Is this question too difficult? Am I not being clear enough on what I want? Am I asking too much?

    This is an important question, I can't keep working on my project if I can't make an inventory list.

    I think it's difficult, because there are like 10 cap files to go through with million objects, events, variables. Strip it down to minimum, ged rid of everything we don't need to see before you upload it. I've tried to make what you asked, I hope thats it. At least I've reduced it from 10MB down to 10kB link

  • Thanks a bunch!

    It's not really what I wanted, but it taught me what the "for" command does, which is pretty much exactly what I needed. :3

    I won't be able to work on this for a few days, but when I get back to it, I'll revive this thread if I need more help on the subject

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