How do I PickUp Items To Display at the top

Get help using Construct 2

Post » Mon Dec 08, 2014 5:58 pm

Hi,
I am looking for a system where i can pick up items in a random order and it puts it at the top of the player in a custom static order separating each[assign by the dev], i currently have the player picking up all the items by using the pin feature but its stacking all the rest of the pickups together and is not doing it in the order which I would like.

i have attached a file showing what i am interested in a general form.

thank you
humbly
You do not have the required permissions to view the files attached to this post.
B
10
S
1
Posts: 54
Reputation: 677

Post » Mon Dec 08, 2014 6:26 pm

I think I could give you the solution also with the sample file. Let me rest this head first and I'll work the case. Cheers
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Mon Dec 08, 2014 6:39 pm

@alextro thank you, no rush i'm currently working and won't be touching this game for another 9+ hours

humbly
B
10
S
1
Posts: 54
Reputation: 677

Post » Mon Dec 08, 2014 7:24 pm

I came up with the solution. Here try this example
You do not have the required permissions to view the files attached to this post.
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Tue Dec 09, 2014 3:50 am

wow!!!!!!! @alextro thank you so much, it took my some time to understand what you did and implemented to what i currently got, but I got it working thnx to you, now i need the objects when they get picked up to go in the the proper position assign by the dev, of is 4 gets picked up first it will go to the 4th spot and if 2 get picked up second it goes to the second spot instead of what we have.
B
10
S
1
Posts: 54
Reputation: 677

Post » Tue Dec 09, 2014 1:17 pm

Actually we just need adjust the code. Easy.
See the change that I highlighted :
Image

Delete first variable than change 'self.quee' into 'self.animationFrame'
So first item will be positioned based on their animation frame order
(1st item @ frame 0)
(2nd item @ frame 1)
(3rd item @ frame 2)
(etc..)

if you don't like zero based you could write the code: 'self.animationFrame+1' ------> just for convenient
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Tue Dec 09, 2014 5:52 pm

@alextro!!!!!! thnx again!!! that worked, going to play with this for while
my next step is to turn each of the frames into an animation since i want them to animate when picked and while some evenst occur in the game but i'll work on that if i get stuck i'll come back here....once again thnx @alextro

humbly
B
10
S
1
Posts: 54
Reputation: 677

Post » Tue Dec 09, 2014 9:38 pm

Glad to hear that. Such a pleasure to solve something :)
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Wed Dec 10, 2014 4:33 pm

hi @alextro;
I was browsing around in the forums and i found the Job Offers and Team Requests, which had me thinking if i should post for anyone who is interested in helping me build this game by joining my team, but before I do that I wanted to ask you instead, you see I am pretty new to C2, my coding background is very limited, i can figure things out pretty well with the appropriate time applied, and i can't really animated, or draw, which leaves me with the game stuck in my head, a few of them!!! lol. The one you just helped me with is for my 5 year old son, he loves Mario so I decided to build a game using the Mario Sprites from devianArt and see what i can come up with, which I would find educational enough for him, and at the same time push myself to start developing my own game.
So my question is, would you like to help me finish this game? is really a prototype and to be honest is already done, but i would like to add some other things, or do you think i should post this request on the the forum i mentioned above, once again thank you for your help...

humbly
B
10
S
1
Posts: 54
Reputation: 677

Post » Wed Dec 10, 2014 7:47 pm

Okay I listened what you are about to request. Say that I can online 3 times a week to help you partially construct the prototype and spent time only to specific area. As an artist I would love do some animation or creating GUI's, but it will took most of my time, professionally to be honest. I prefer coding since Construct 2 gave me easy acces to do this. So yes you can count me in to assist you scripting the code.

But don't expect I write them in quick fashion. Logic is what I need to decompose first before I hit the test button.
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Next

Return to How do I....?

Who is online

Users browsing this forum: LaDestitute, lukewasthefish, OBLIVION, yiuyiu6666 and 16 guests