How do I fix my Inventory Problem

Get help using Construct 2

Post » Sat Jan 10, 2015 10:38 pm

Imma have to redo it I think. Gimme a sec
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sat Jan 10, 2015 10:49 pm

@codah Heres a new one.. Hopefully works for u.
You do not have the required permissions to view the files attached to this post.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sat Jan 10, 2015 10:55 pm

Sorry couldn't wait so try this one. Hopefully it will demonstrate the inst var thing. But I'm on my way out soon so good luck.
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Jan 11, 2015 12:07 am

Yer. Srry it took so long.. Imma try my best. Little by little I'm learning everything I need lolz. I appreciate all the help.

Edit: Noticed if a Object is put over another object.. In slot. It Overlaps :/

Edit2: Tried fixing it.. I think I made it worse XD
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sun Jan 11, 2015 3:44 am

@Unnatural20
@codah
Ok have a prob now. I recently tried changing things up a bit. I changed it to when I drop something. I can pick it up again, and so it doezn't pick up EVERYTHING I have it pick top instance.... Anyways. When I pick something up again it changes. I noticed that with the new item frame code fix it changed "item name" to frame number... which just resets it to 0. Its odd. Imma give my full .capx.. Its in the Event sheet called Game Events... and some is towards the middle, and rest bottom. Hopefully it can make sense to someone. If u find anything else wrong with my .capx in general I dun mind tips lolz. Im making a Farmming game in case no one knew. I have ALOT that probs need to be fixed, and added etc. Itz slowly comming together. Any help is appreciated.
You do not have the required permissions to view the files attached to this post.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sun Jan 11, 2015 12:07 pm

The problem I see is in Event 131, under ">Mouse -> On Left Button Clicked on ObjectsDisp"
You have, "Inv -> Delete index Inv.IndexOf(ObjectsDisp.ItemGroup) from X axis."

This can delete the intended object, , or it might instead remove another object with the same item group. However, you always *create* the right kind of object, so you could (as the demo stands) end up with two hoes or two hammers.

My suggestion: Give ObjectsDisp another instance variable named "SlotNumber".
Then, in refresh inventory, Inv -> For Each X element (Event 128 or so) add ObjectsDisp -> Set SlotNumber to Inv.CurX.
Then, in place of what you had, Inv -> Delete index ObjectsDisp.SlotNumber
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Jan 11, 2015 2:57 pm

Ok thanks.. Took a while but I got it working. i was doing some things wrong at first

@Unnatural20 Ok for some reason "ToolName" is being set to 0 in the Array. So when I check for like "Hammer" it can't find it because there is no hammer its 0.

@codah Maybe u can see what I'm talking about
You do not have the required permissions to view the files attached to this post.
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Sun Jan 11, 2015 6:17 pm

Bump.

Edit its the Objects -> ItemGroup = "Tools" Toolnames.At(Objects.AnimationFrame)

Bit. It changes Toolname to a Frame number.. Which always becomes 0. It need to be a String Text.. Hence ToolName lolz

Edit2: Fixed it.. Had to set The Toolnames array width to 0 XD
B
8
S
1
G
1
Posts: 96
Reputation: 632

Post » Mon Jan 12, 2015 3:59 am

david7457 wrote:Bump.

Edit its the Objects -> ItemGroup = "Tools" Toolnames.At(Objects.AnimationFrame)

Bit. It changes Toolname to a Frame number.. Which always becomes 0. It need to be a String Text.. Hence ToolName lolz

Edit2: Fixed it.. Had to set The Toolnames array width to 0 XD


good you got it working
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 12, 2015 4:25 am

@codah
By chance have u seen my other post with my other issue lolz. Any idea on what I can do?
B
8
S
1
G
1
Posts: 96
Reputation: 632

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: nahima and 9 guests