inventory items moving to right slot

Get help using Construct 2

Post » Wed May 06, 2015 3:59 am

so this is my vision of what i want my inventory to be when character kills enemy and weapons drops it rolls stats (found out items cannot be in family if you want randomized stats) so each item is a container with unique id and such. so when the item goes to inventory so click sword to pick it up and it goes to inventory ,aswell a pinned item box on it and when you pick up another sword it supposed to go to the next slot

but it just layers over on the same slot

I think i got the drag and drop good enough thanks to someone's capx cant remember the name but thanks incase you stumble on this thread

does anyone know how to get it fixed to items going to the next slot , either i'm missing something or my programming is wrong

apparently i cant upload my capx file??
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 4:01 am

ya i looked around i dont have the upload file option anymore, whats going on?

here is a link to my capx

http://www.mediafire.com/download/hxn3hpynfoms8q6/Inventory+drag.capx
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 5:29 pm

plz help me
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 7:58 pm

I can't fix it myself but I can tell you what the problem is, you are creating an object at the same place everytime its clicked without first evaluating which inventory slot should have an object placed.

Meaning you need to check a slot before you create the object on click. And if its empty place the thing youre creating at the slot that is empty.
B
2
Posts: 5
Reputation: 160

Post » Wed May 06, 2015 9:04 pm

i thought thats what the pick by evaluate was for......
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 9:23 pm

Right, but look at the order you have it in, every frame its going to

wait for your click command
make the object

make it at the same slot each time

meaning to make it at a different slot you need to move around your events to make sure that the information for which slot to use is there BEFORE creating the object at a slot.
B
2
Posts: 5
Reputation: 160

Post » Wed May 06, 2015 9:31 pm

would you happen to have skype , can you tackle this with me my skype is "gryz34"
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 10:00 pm

sorry dont got that, i tried to fix it myself but cant figure it out. What you should do is try and figure it out
one idea is that everytime you click the item to create you run a for loop on each inventory UI slot (the UID even) and see if there is an item, and then use the pick by evaluate thing you were talkin about and THEN create on the next available/empty slot you checked to.
B
2
Posts: 5
Reputation: 160

Post » Wed May 06, 2015 10:21 pm

ya thats what i'm trying to do , trying to find a tutorial with create items that spawn in an orderly fashion with array. but i need the click first because thats the instance a player picks the item up, i've tried it many different ways. so hard to make inventory and i dont wanna pay for a pre built one
B
10
S
1
Posts: 97
Reputation: 700

Post » Wed May 06, 2015 10:22 pm

do you have any voice chat program?
B
10
S
1
Posts: 97
Reputation: 700


Return to How do I....?

Who is online

Users browsing this forum: Shenkai the ssj, tatogame and 22 guests