How do I Switch Values Inside My Array Inventory CapX?

Get help using Construct 2

Post » Thu Jun 26, 2014 1:10 pm

https://db.tt/JwFUtlq8

Hi everyone,

Ive been testing my inventory and i finaly was able to get it working how i wanted it to.

I just cant figure out how to make my slots switch places with one another when pressed and not of equal value.Could someone give me a hand and show me how to do that within my inventory? This is my only roadblock i have in the road from being able to finish my project.
Thank you guys for everything thus far.

I have been on here before asking for a similar issue to be solved.I wanted to implement drag and drop but a few veterens told me it was unable to happen since how my code was structured.
To try and bypass the drag and drop im just looking for a way that the player can move an item from one slot to another.
I actually had a go at it but im not getting the code right,thats why im asking for help.Everything is perfect besides that fact that i cant move an item.
I just wanted to make it more clear for everybody,i tend to be confusing when i speak.Thanks in advance to anyone that glances at this.

I did have this posted in the General tab,I accumulated over one hundred and fifty views with no feedback,so im trying my luck here in the How do i section.I maybe should have posted here to begin with.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Thu Jun 26, 2014 1:35 pm

I assume you want a condition that says "not the same" and then transfer the data of the first slot into a seperate variable that you can use later.
And also put the data of the second slot into a seperate variable. And then after you "dropped" it (assuming drag and drop) you will be transferring the data back but in the switched positions. Hopefully this makes a little bit of sense and will help you in the general direction you're trying to go.
B
6
S
1
Posts: 73
Reputation: 571

Post » Thu Jun 26, 2014 2:31 pm

Not sure that's what you want, but here it is...

Encrypted_Inventory_Remix.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 658
Reputation: 3,843

Post » Thu Jun 26, 2014 2:37 pm

Added a correction so, when the player drops an item, it ignores the dropped item's slot as previously selected, since it's now empty.

Encrypted_Inventory_Remix.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 658
Reputation: 3,843

Post » Thu Jun 26, 2014 2:42 pm

Thank you @brunopalermo you have saved my project from being lame! i sent you a PM
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378


Return to How do I....?

Who is online

Users browsing this forum: purplemonkey and 8 guests