Item collection for rpg?

0 favourites
  • 6 posts
From the Asset Store
A fantastic package of 117 high-quality & game-ready sound effects for User Interface, Items, Power-Ups, and more!
  • I'm in the progress of making an rpg dungeon crawler. I had it so it would just stack up items in one slot of the 36 slot inventory. The concept was fine, but not for inventory limit, and I don't want to go through the trouble of giving items weight. So instead, I want to have it so each item that is picked up, even if it is a duplicate, can be in a new item slot. Using the same sprite for each slot though is proving difficult. Is there some way I could add a boolean when an item is overlapping the item slot so that it knows not to put a second sprite there? It seems you can't use overlap for 9-patch, which is what I'm using for the slots. And I don't know how to say, spawn another sprite for the duplicate item. A capx can be provided, but beware I have many, many events in a complex directory.

    Thanks ahead of time.

  • How do you track the items in the inventory? Is it just using the 9-patch or do you actually have a data structure backing it?

  • gumshoe2029 after picking up and item, I just have it to set that item count (global variable), and set the item icon to visible, and pick nearest 9-patch and set to its position. I guess I could pick each 9-patch's UID and then every hundred of item is overlapping, not let every other hundred of item be in its place.... I really am having some issues thinking of a way to do this.

  • I have a question do you want a champion of norath style of bag or do you wish to do something like 5 large crystal and then start a new stack or just five slot of large crystal ?

  • Gearworkdragon I would prefer stacks, but if I have to do 1 per slot I will.

    Being able to change the amount in a stack for different items per slot would help with inventory capacity.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If were doing stacks like 20 cloth and start a new one. Id would do something like this Make an inventory sprite of the item and slap two variable on to it let call it Current and max. And have an event something like this If "current" variable is equal to 'Max' variable Then make a function of create the sprite into the next slot and +1 to its current variable.

    That should be it. But i do not know how to split stack if we are talking about trading a certain ammount. that one is out of my league.

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