How do I scroll a layer?

Get help using Construct 2

Post » Wed Mar 02, 2016 8:56 pm

Hi,
I want to add a menu to my game that has the ability to scroll. My idea is to put all the elements of the menu on a layer and make the layer able to scroll. But I don't know how to scroll only one layer. Any ideas?
Thanks! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Wed Mar 02, 2016 9:50 pm

If you use layers, you might be able to play around with parallax to get only that layer to scroll.

You don't have to use layers though, you can just place and move your menu sprites up and down specifically.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Thu Mar 03, 2016 9:46 pm

@oosyrag,
Thanks for your reply! Now would it be possible to put all the objects into a family and move them up and down when scrolling? How would I prevent the menu from scrolling offscreen?
Thanks again! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Thu Mar 03, 2016 11:17 pm

You can use families.

To prevent from scrolling offscreen, you would use conditions to limit the event to only work within the range you specify.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Sun Mar 06, 2016 6:42 pm

If you place all your menu items inside the layout and set the layout's "Unbounded Scrolling" to No, then you should be able to stay inside the layout no matter how much you scroll out.

I think you should check out this template https://www.scirra.com/store/royalty-free-game-templates/swipe-level-selector-1006, it has a very smooth scrolling feel, sure it was made for level selection but I think you can easily adapt it to a general purpose game menu.
ImageImage
B
42
S
13
G
10
Posts: 164
Reputation: 7,625


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 62 guests