Is It Possible To Get A Scrolling Effect Like This

Get help using Construct 2

Post » Sat Dec 07, 2013 9:50 pm

http://www.terrariaonline.com/attachments/image-jpg.65420/

I have attached a link to this post regarding the style of scrolling im trying to do.

I myself understand how to implement everything but i am lacking the skill make my list move up and down when the player swipes up or down or left and right.

When it comes to scrolling in this fashion there are almost no tuts or examples availible.
Could someone give me a hand in understanding this.
thanks

@jayderyu

i seen you helped newguy out by anwsering his question,Mine is almost the same as his but i would like to scroll my inventory box so its going up and down with your entire inventory.Could you give me a hand with this. RookieDev2013-12-07 23:29:37
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 08, 2013 6:09 pm

Anyone?
And if i am not as detailed as i should be in descibing my issue please let me know.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 08, 2013 6:19 pm

I've seen many examples of scrolling in the forums, why not adjust one of those to your needs?

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Dec 08, 2013 6:22 pm

@LittleStain I have been looking for one but all i have seen were for scrolling entire layouts and not scrolling on an Inventory screen.
I looked through every FAQ How Do I and still found limited info.
Most of the scrolling examples are hidden.
I usually go to google if i cant find anything in our forums.RookieDev2013-12-08 23:38:14
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 08, 2013 6:26 pm

Instead of scrolling the layout, you could easily adjust to scroll a layer. This way you could let a part be obscured by layers on top or you could use blendmodes to make part of the layer invisible.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Dec 08, 2013 6:32 pm

@LittleStain I definitly understand where your coming from and what you are suggesting i do,I have been doing since day one to actually learn how things work.
I love to decode capX files aand learn from others.
I will have another look around but i come to the forums to find a soulution to an issue that i dont know much about.
Scrolling should be one of the Top Tutorials on scirra since the mobile market is Very Big.I kinda kicked myself in the rear by waiting this long to learn about scrolling but in my head i thought it would be fairly easy to find out how to create the effect.
RookieDev2013-12-08 18:34:06
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 08, 2013 7:04 pm

@RookieDev, I also need an effect like this in my work, but I've been holding on. But just got an idea from what @littlestain said (although that might not solve my own problem) why can't you inventory list be a layer that is always visbile( the oda game area is the remaining dimension, you camn follow my signature link to see how I cut out a part of the layout into a layer which is always visible), then you can add the scrolling effect to that layer like @littlestain said.
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sun Dec 08, 2013 7:17 pm

The most important part in creating scroll is comparing the start of the touchinput with the current touchposition.
Second most important thing is to disable unwanted input while scrolling.

My personal preference is creating a sprite on touch start if the touch is not overlapping an active part, store the touch start positions as variables in this sprite and compare touch position with this sprite. While this sprite is visible all other events except the scrolling are disabled by deactivating the groups they are in. if touch.y is less than sprite.oldY I set the position of the things I want to scroll to their y position minus abs(sprite.oldy-touch.y), if touch.y is more than sprite.oldy I add abs(sprite.oldy-touch.y) to their current y-position.

Those are the basics for vertical scrolling I guess..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Dec 08, 2013 8:01 pm

@Dasat @LittleStain i will take everything you both said into account,I will go back to looking through capX files to try and figure this out so it fits my creative vision.Thank you both for your replies,It means alot to get help.I think people like me know how it feels to be stuck on something for a few days.Thanks again
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 08, 2013 9:15 pm

Tinkering around with this all you need is a object with the drag and drop behavior, objects pinned to that and a layer to do the masking. The extent of the math needed is a clamp() to limit the range of scrolling. Unless of course you want a widget on the right that indicates the scroll position, then you'll need a bit more math.

https://dl.dropboxusercontent.com/u/5426011/examples20/scrollbox.capx
enjoy.R0J0hound2013-12-08 21:15:54
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Exabot [Bot], MikaelS, nahima and 25 guests