How do I fix my Inventory Problem

  • codah

    I can make a .capx of just the Inv again lolz

    Edit: Here it iz

  • Bump

  • Bump

    This is not fully working, but your capx has other issues which I don't have time to fix. I've changed ObjectsDisp to Objects, and hopefully you can figure out the rest.

  • Nope can't fig it out either. U forgot Imma noob lolz. Only prob I see is when an item is clicked it pick up everything..changes them randomy, and only adds one to the array. O.O Itz odd. Got me stumped too :/

  • Go through events and picking one event/condition at a time. Think about exactly which objects are picked at each stage, and why. Simplify things to the point that they are trivial, and working, then add back one thing, then another. Use debugging. I use Browser Log function a lot to show debugging info in Chrome. They are my tips to you. But as you hopefully saw, I did what was asked and changed ObjectsDisp to just Objects. It wasn't working before that either. Keep posting individual questions, I and others are more than happy to help, but 'my inventory doesn't work' is too general. Good luck

  • I read your original post and skipped the next five pages.

    Based on what I believe I understand that you are trying to do (since it sounds similar to something we will be doing soon), we have item_id "Instance Variable" that is set during the initial creation loop and identifies the specific object on mouse over. That way, specific frame ID's can be stored locally on the sprite instance, rather than in a correlation array or hash (as we used to do).

    When we mouse over the object, I pull the item_id then use that to set the frame of the object being created to drag and drop.

    This is kind of a different paradigm than what you were pursuing though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Im just trying to make it as condensed and simple as possible. Obviously Im doing a terrible job lolz. What I want exactly is an Inv that I can Drag and Drop To and possibly from (That's debatable) I want something like this

    (From Harvest Moon 64) Im making a Farming game. I would like the Inv to actually be on a diff layout that can be switched back and forth. With a Hotbar on the Main Layout (Like Minecraft). When u press "i" Open Inv on other Layout which would be like the Rucksack. I mentioned this in an original post but I was mostly ignored.. so I went a diff direction. It sorta works. But iz not what I really want. I dunno how I can move items from an array to another layout..and select them... Let alone drop them. BTW the way you are mentioning sounds interesting. Wouldn't know how to go about something like that either.. You probz didn't see the part about me being a total noob :/ I dun mind fixing the issue. if I know how. But most of the time I don't know how :/ Anywayz if u have any ideas or tipz or anything gumshoe2029 Lemme know lolz Once again keep in mind Imma noob :/

  • Yea, we have something similar.

    Make each of objects "Drag & Drop" behaviored, and if you need assign an additional instance variable flag for "locked" status (if you want them to be approximately droppable). Then if locked=1 set sprite x,y to the box x,y. You will have to do a check to see if the mouse cursor is over a "box" sprite (assuming you are using sprites for individual boxes), in order to cause the tool to jump to the box slot.

    I am kind of newbish too, so don't take what I say as gospel, lolol. I am a server programmer foisted -- somewhat unwillingly -- into Construct.

  • gumshoe2029 Every little bit helpz. Appreciate the tipz lolz.

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