Is It Possible To Get A Scrolling Effect Like This

Get help using Construct 2

Post » Sun Dec 08, 2013 9:22 pm

go go R0j0hound. I just saw this post :D

that's pretty much what I was going to suggest. Since the example screen doesn't show anykind of moving gameplay. You can just mask it.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Sun Dec 08, 2013 9:36 pm

@R0J0hound

THANK YOU!!
This is exactly what i was looking for!
This is almost identical to the style of scrolling i need.This is better than most AAA Games on mobile,The style is awesome Thank you guys im about to decode this to the best of my knowledge.

@Kyatric Can you move this to the FAQs in How Do I Section.
I think this will help out almost everyone on the forums.RookieDev2013-12-08 21:38:23
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Wed Dec 11, 2013 1:54 am

@jayderyu @R0J0hound

Do you guys mind if i ask you another question about this capX file?

I have been looking this over for a few days and i actually do understand how it works.One thing that i cant put my finger on is setting the Clamp to the BBox Bottom and BBoxTop the right way.
When i use your method i get some crazy bugged out effect where my scroll bar jumps from one place to another.
I guess my question would be Is there a specific way to set up a frame for scrolling if it will be clamped to the bounding Box?
Should i use a frame size mimicking the size of the scroll area?
also would it be possible to just clamp my scrollbar to the top and bottom of the window view port? If so could you explain how to do so?
I understand everything but just these factors.

RookieDev2013-12-11 01:56:12
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Wed Dec 11, 2013 5:49 pm

It helps to visualize if you draw a picture or move the scroll_pane around in the editor. Clamp is used to limit how high and low the scroll_pane goes. Basically we're doing this: "set y to clamp(self.y, low_y, high_y)". To find the low_y move the scroll_pane as far up as possible so the frame object covers the last bottom portion. Where the y position of the scroll_pane in relation to the frame. It's the scroll_pane's height above the bottom of the frame or "frame.BBoxBottom-scroll_pane.Height". Next to find the high_y move the scroll_pane as far down as possible so the frame object covers the topmost portion. Notice that the top's of both objects are the same so high_y is "frame.BBoxTop". Now if the hotspot of the frame is topleft it also is valid to use frame.Y instead of frame.BBoxTop.

Generally you want the scroll_pane at least as big as the frame. Also you could also use two events to compare scroll_pane's y position instead of using clamp for the same effect.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sat Dec 14, 2013 1:51 am

@R0J0hound @jayderyu
can i ask you something?
I have taken everything you said into account and i figured out how to make everything work inside of my own project.i want to thank you for that.One thing that still bothers me is one event that you have placed inside of the capX.I circled the event inside the photo.I was wondering if its possible to make that touch?When i tried switching it to touch control things got buggy and wouldnt work.Is it a must that i have to use a mouse event or can i use this same capX for a touch scroll?Everything works with touch but that one event.


RookieDev2013-12-15 03:22:54
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sun Dec 15, 2013 3:30 am

Anyone Know how to get this to work with touch?
I have tried a few different methods and im not coming up with a great outcome.I really want to use this example but if i cant get a scroll effect with my finger im kinda screwed.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sun Dec 15, 2013 5:15 am

Wouldn't an inverted "is touching inventory_menu" work as a replacement for that condition? The idea of the event is to stop dragging if the first click is just on the invisible part of the scroll_pane. You could just remove the event if worse comes to worst.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sun Dec 15, 2013 5:31 am

@R0J0hound

Thank you,you have enlightened me and shown me that the first event was in fact the main issue i was having.I really was under the influnce that everything you had placed in the capX was there for a specific reason and for that reason i didnt want to delete anything.
Thank you for showing me this.

Is it ok if i release this capX in the newly made capX section of the tutorial page?
I think this topic has became quite hot.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Sun Dec 15, 2013 6:37 am

Sure, go ahead.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sun Dec 15, 2013 7:50 pm

@R0J0hound @RookieDev do you now now how this get work on touch?
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,555

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests