Endless Scrolling for a Cutscene?

Get help using Construct 2

Post » Mon Mar 03, 2014 9:53 pm

Hello, ^^

I managaed to experiment with getting a camera to LERP with my sprite, however I plan to make a cutscene wherein my character is walking in some...lets say endless hallway O_O... Can I make my camera
scroll forever as long as I haven't pressed anything???
B
8
Posts: 35
Reputation: 388

Post » Tue Mar 04, 2014 1:40 pm

I think you're thinking the wrong way... The trick is to animate the background, not the player, in such scenes.
B
11
S
2
G
1
Posts: 172
Reputation: 1,486

Post » Tue Mar 04, 2014 1:46 pm

You should take a look at the Templates, especially the "Endless runner" one. Templates are in the File->New menu in C2, after the common project configurations.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Tue Mar 04, 2014 3:04 pm

@iceFlashEX1, the common method to add an infinite scrolling background is to create a Sprite object twice as wide as the layout, and add the bullet behavior. Then, once the Sprite object has moved halfway off the screen, you move it back to the original position.
Caveat: Depending on where exactly your background repeats, it may not have to be a full 2x layout.width. You would just move the sprite back to the original position whenever it reaches the repeat point.

Though, actually, now that I think about it... you might just be able to use the Wrap behavior with a single sprite with the bullet behavior. It'll be a good experiment to try.

I hope this points you in the right direction.
B
20
S
4
G
1
Posts: 185
Reputation: 2,563


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 29 guests