How can I make a similar inventory?

0 favourites
  • 8 posts
From the Asset Store
Template for maintaining an inventory with crafting possibilities. Completely documented in text and video.
  • I can't find the guide.

    All the sites and videos that I watched, apply to make 10+ slots, regardless of equipment. but I want the nummber of slots to depend on the what item is worm on the player. How can i do this?

    Here I want to make a similar inventory

    (By the way, this inventory is from a game that was created in 2014 on C2)

  • What did you try so far ? I feel like whatever I respond with then the next reply will be asking me to make it.

  • Why do you think so. I will try to understend from your words what I need to do.

    I added to my project "player", "skin" a couple of clothing elements, "on the ground", "on the player" and "in the inventory", the same for the weapon, for the apple i added only two sprites, "on the ground" and "in inventory". pants and jackets that are on the ground have the logical change "equip" and the digit change for sprites that are in the inventory:

    and this is what my inventory will look like, I planned that each item will have its own array with its own content. and for each slot, I made a "jmage point" where objects torn from the ground should be attached:

    in all families, except for the "Object" family, there is a "State" text variable. there are 4 variables in the "Object" family: textual "Type", digital "Frame" with a value of 0, one more digit, but already with a value of 1 "Amount", and the last logical variable "Stack":

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I feel like whatever I respond with then the next reply will be asking me to make it.

    Isn't that to be expected since many Construct 3 users are visual learners? Visual editors attract those types of people. I'm one of them. Unless the answer is simple, a complicated written answer isn't enough. Visual learners will most likely need to see an example to learn from it.

    Adic.48

    Here's an example. I didn't create it and I'm not sure who did. I think I got it from someone being helpful in this forum though. I think you can change it to fit your needs.

    https://www.dropbox.com/scl/fi/y8satdsk7szbxeo7c6r7b/click_inventory_example.capx?rlkey=559wy1vrd488ohi1i8zbsg00e&st=atk2fp9u&dl=0

  • quite an interesting source. But still, in addition to dragging objects, I am also interested in the array itself. I was more interested in myself, here is this source, and its paid and better version for C3, which, unfortunately, I cannot buy yet:

    "Advanced inventory mechanics for your RPG game (Array-based). Take Items, split them, pick up them, read the description" (can be found in the C3 store)

    I kind of feel like I'm moving forward, but because I'm pretty weak at it, it's hard for me to achieve it

  • You don't have to pay for it. You can go to YouTube and search "Construct 3 inventory tutorial" and they'll walk you through making a more complexed inventory system for free.

  • I just don't understand how I can make it so that the number of slots depends on the clothes worn and how can those guides help me?

    they suggest that the player has a certain number of slots at once, but how can I check this with the fact that I, for example, want to add two jackets, as they will give. different number of slots, for example one will give two slots and the second jacket 5 and this depends on what the player wears

  • sorry, my initial post was kind of irrelevant because i didn't understand your system.

    so, the first thing i would recommend is to read up on containers in the manual.

    i would make one object type to represent all of the equipment, and then give that object type a variable that holds what it is and one that holds where it can be equipped, as well as a variable that holds how big its inventory is.

    then i would put that object into a container with an inventory array, and set the inventory array's size to the item's size in an event.

    this will simplify your code base dramatically because you won't need to use families--all of the equipped inventory can be picked at once with your "on the player" variable

    once that's done, it seems like you already have the basic setup done: gear has an associated array that can hold N items. now you have to draw the items, which you can do with a (fairly complex, tbh) nested set of for loops, one for each equipped item, and one for each entry in the equipped items array.

    item is "on the player"

    for each item

    -----create itemIcon at x = loopindex*25, y = 300

    -----itemIcon set animation item.Type

    -----inventoryArray for each X element

    ----------create itemIcon at x = item.X+10, y=310+(loopIndex*10)

    ----------itemIcon set animation inventoryArray.At(inventoryArray.curX)

    this would draw all the items vertically below the equipped item, if you set up the itemIcon to hold 1 animation for each item name.

    i hope that helps you move forward!

    edit: sorry i don't know how to render the tabs correctly

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