move a layer or its contents?

Get help using Construct 2

Post » Tue Sep 11, 2012 3:02 pm

There is a main game screen, and a settings screen (where you can set the number of lines, switch sound on/off etc).

We have spent 3 weeks so far trying to scroll the settings screen over the top of the games screen (or shift it over) with the unpredictable width of crop fullscreen mode (which is a requirement for mobile).


We tried these and rejected these strategies:
1) make setttings a different layout. Rejected this strategy as you cant scroll another layout in/out of the current layout, and you lose game state.

2) put the settings form as a single sprite, move the sprite over the layouts, and try and use the cursors X&Y corrdinates to work out which button you are over. This failed as the relationship between the X coordinate of the touch event has no relationship to the object its over due to scaling, browser size, crop mode, viewport etc and these relationships seem to be undocumented. We dont know what a viewport or canvas is.


Now we are considering putting the settings objects (buttons to increase/decrease volume etc) in its own layer with the contents to the far left outside the window area. however, how do you scroll just a single layer? We cant scroll the entire layout, as the variable screen size in crop scaling mode means we dont know how much gap to create beteween the main screen and the settings screen (if the window width was fixed, this would be easy).

Any thoughts or strategies to try would be much appreciated.

So far we have spent 3 times more money trying to swipe in a settings screen that it took to create the entire game.nutmix2012-09-11 15:08:06
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Tue Sep 11, 2012 3:09 pm

Yes, unfortunately there's no way to set parallax or scroll desired layer.

If your setting screen is made of sprites only You could put them all into one family object. Then you can slide/scale/move them as you like.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests