level scrolling

Get help using Construct 2

Post » Mon Sep 14, 2015 11:57 pm

I was watching some videos on level design, specifically super mario bros. I realized that you can't walk back to the start or backtrack, because the level doesn't scroll backwards. I want to try this but I don't know how. Does anyone have any idea what i'm talking about.
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Tue Sep 15, 2015 3:29 am

I would think that would be easy, you make an invisible sprite that has "scroll to" behavior on it. If the player moves past the center to the right, that sprite moves to match, but if the player moves left, the invisible sprite doesn't follow. Lock the player to the visible screen by not letting it move half the screen width away from the invisible sprite.
B
241
S
63
G
33
Posts: 903
Reputation: 40,729

Post » Tue Sep 15, 2015 11:21 am

could you put that in event form?
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Tue Sep 15, 2015 3:23 pm

This is the platform demo with parts I added under the group "Scroll to."

https://dl.dropboxusercontent.com/u/85412219/forumposts/Scrollto-rightonly.capx

The Scrollto sprite (InvisibleSprite) is not invisible for this example, so you can see where it is.
In your game, set it's "Initial visibility" property to invisible.

Oh, almost forgot, there is a scrollto behavior on the player too, currently disabled.
You could enable it, and the player would be able to scroll backward a half screen.
You would have to change the 2 half screen width limits in event 12 to full screen widths of 640.
B
241
S
63
G
33
Posts: 903
Reputation: 40,729


Return to How do I....?

Who is online

Users browsing this forum: Cubeeo, monster4096 and 6 guests