How do I fix my Inventory Problem

Get help using Construct 2

Post » Sat Jan 17, 2015 6:58 pm

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.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Sat Jan 17, 2015 11:17 pm

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 Image (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 :/
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sun Jan 18, 2015 2:06 am

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.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Sun Jan 18, 2015 1:46 pm

@gumshoe2029 Every little bit helpz. Appreciate the tipz lolz.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Previous

Return to How do I....?

Who is online

Users browsing this forum: ultrafop and 24 guests