How Do I Make Scrolling Slots For An Inventory?

Get help using Construct 2

Post » Fri Nov 29, 2013 8:43 pm

ok. Well C2 isn't very good at cutting out images on a scrolling system. The best way for such a thing is to put an image on top. For what your looking for you couldn't scroll them graphically through the top as the top hider image would also hide the game screen :\. You can check the iScroll plugin.

However you can iterate through your array lists and redraw what's seen.

variable(store wherever)
var current_row = 0;

Pop the inventory box onto the screen.
repeat(col * rows)
--> create inventory_tile
--> set tile frame/animation to Array.atValue(loopindex + (current_row * 8) )
--> set inventory_tile.xy(loopindex % 8 * width + offset_X, loopindex / 8 * height + offset_y)

When you need to change. Change the current_row value, destroy the current icon tiles. Redraw loop.

That's the principle idea of scrolling through. this was just a quick guide. Nothing detailed so I am probably a smudge off on my math formula.
jayderyu2013-11-29 20:45:32
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Fri Nov 29, 2013 9:13 pm

@jayderyu

Thank you for explaining that to me.This is all i really needed to know. It will be alot easier with some of this information you have given me.
Thank You.
B
9
S
5
Posts: 126
Reputation: 1,295

Post » Sat Nov 30, 2013 8:07 am

No Problem,

I see you got aid/help. Sorry didn't offer any myself. I was running short on time yesterday. I agree with setting tile frame/animation.
It looks good, interesting way on handling Inventory.

No need to feel foolish, we all have different strengths and is totally dependent on what you have done previously. We can't all be experts on everything.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests