May I Have Some Help With My Inventory CapX Please

  • Lennaert Thank you for taking the time to help me out with this issue.

    Do you know how to implement this feature to the slots on the left?

    What im trying to do is once the item is dragging and over the desired slot i wanted the item to swap places with eachother along with the amount.

    Youve created this in the equipment slots and that isnt the slots for my inventory even tho they will be used aswell.

    I dont think that is possible as it would require rewriting almost the entire thing.

    The items on the left, is your inventory. they depict what you have. (horizontal lined squares)

    The items on your right, is your equiped items list, (vertical stacked row)

    Now, if you drag or click your item to the first square in the right row, it means you have THAT item equiped on helmets, while it is still in you left inventory.

    You can change the items equiped,but they will remain on the same spot in your inventory.

    Your inventory has no system to swap spots within your inventory locations and I am not going to make that as it would require rewriting a large chunk.

    Your inventory is actually very advanced, but it looks to me your not understanding it yourself.``

  • lennaert thank you for letting me know this,I do understand my inventory as it is right now,Just because i lack the skills to implement a feature i know nothing about does not mean i know nothing about my inventory.I admire your honest remarks but in the end i am still clueless.I want to thank you for your reply to my post because you did teach me a few things.

    The only other person i know that can show me or even tell me how to implement this feature is

    R0J0hound,if you are not busy could you explain to me how i can do this the right way? I dont want to have a faulty system withen my inventory and i know for a fact that you know you stuff when it comes to code.

  • The thing is, your inventory system was/is already working correct.

    I only added an interface option which allows to drag inventory items to their desired equipment placements. And it works, just like clicking them does. I used the xisting mechanic, I only added 2 events to handle drag start and drag letting go.

    And i added an extra condition where you normally clicked on the equipment slots, with over lap option.

    This effectively makes the function the exact same as clicking it.

    From what it looks like your asking is, after dropping, swap the locations in your inventory ... which imo .. is also kinda useless in the first place as your just reordering your material around in you inventory slots. But the inventory placement, and items system work as it should.

    Heres a problem, your equiped item is tied to the item in your location inventory. You will have to rewrite your array contents if you want to swap them ....

    whats wrong with having the inventory items remain on their position once equiped ?

  • lennaert

    the main reason im looking to swap positions of items is because this game will have chests that the player can swap items to and from.

    I Have no issues with how this inventory works in general,im just trying to add to it.I guess what your saying is i have to rewrite my whole inventory?

  • Lennaert

    the main reason im looking to swap positions of items is because this game will have chests that the player can swap items to and from.

    I Have no issues with how this inventory works in general,im just trying to add to it.I guess what your saying is i have to rewrite my whole inventory?

    It apparently wasnt build with that intent.

    Either it has to be rewritten with that possible function incorperated.

    Or some method has to be added allowing for the array with inventory items to be rewritten upon item swap. But my knowledge of the Inventory stops here, I know there is a list of predefined items, stating which item falls in what category, but its also tied to the spot in the regual inventory. So it could very well be, that while rearranging your inventory you will need to update the equipted array too ....

    It ofc is possible, but as I didnt build it, for me it would be a lot of trial and error before having it work decent.

    There are other inentory systems out there which work more to your liking, but do not have the equiped items thing in it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check Skype. I'm gonna get on this ASAP.

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