How do I enable/disable the unbounded scrolling on the event

Get help using Construct 2

Post » Mon Jul 14, 2014 12:58 pm

Hi there,

is there a way to enable and disable the unbounded scrolling via event sheet?

I want to make a camera shake and have to disable the unbound scrolling to see the effect.
But when the shake effect ist over, the camera should follow the player again.

Any idea?
Posts: 11
Reputation: 216

Post » Tue Jul 15, 2014 3:03 am

Howdy! I wanted to do something similar with my game, but I couldn't find an event to change bounded/unbounded scrolling settings in-game.

My solution was to set every layout to "unbounded scrolling", and then change my camera behaviors so they only followed my sprite's position if it was within a certain area. For example, if your game's window size is 400 pixels wide, you make it so that the camera follows your sprite's X if it is greater than or equal to 200 and less than or equal to (LayoutWidth - 200).

Then you build your level a little beyond the borders of the layout's actual dimensions. That way, you'll only see that little bit of extra level if the camera shakes while its near the edges of the layout. But the camera won't scroll that far otherwise.

It might not be the simplest solution, but it worked for me.
Posts: 39
Reputation: 2,697

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests