Scroll the window view left of the layout view

Get help using Construct 2

Post » Mon May 25, 2015 3:55 pm

Image

I'm creating a vertical shooter for desktop. The particular mechanics of this game require a playing field 4:3 in proportion, but of course most desktop screens are widescreen HD, 16:9, so I've decided to use the surplus screen to display a hud at the sides of the playing area. In the screenshot, the layout is 900x675 (4:3) and window size 1200x675 (16:9). Thus the dark green area to the left is outside the layout, and this is where I'd like to display my hud.

So far so simple, but I would like to give the option of choosing the location of the playing field. Left, as in the picture, centre, or to the right. This would require setting the window position to something like x = -300 (playing field shown on the right) or -150 (centre). Can it be done? I think the alternative is going through my entire project and shifting every object +300/150 pixels, which would be pretty time consuming.
B
19
S
4
G
4
Posts: 67
Reputation: 3,181

Post » Mon May 25, 2015 4:58 pm

Set the layout property "Unbounded scrolling" to YES.
You can scroll manually or create an object with the "scroll to" behavior.
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Mon May 25, 2015 7:07 pm

Wow, surprisingly simple after all. Thank you!
B
19
S
4
G
4
Posts: 67
Reputation: 3,181


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 9 guests