Auto Scrolling

Get help using Construct 2

Post » Sun Jan 06, 2013 9:42 am

How would I make a platforming game where the screen continuously scrolls upward so if your caught at the bottom you die. Also if a certain time is elapsed the screen scrolls upward a certain amount.
B
19
S
5
G
4
Posts: 63
Reputation: 3,937

Post » Sun Jan 06, 2013 10:02 am

[code]Start of layout:
   -> Set scrollY to Player.Y

Everytick
   -> Set scrollY to scrollY-scrollSpeed*dt

Player.Y > scrollY + windowHeight/2
   -> die[/code]
(In the last one, I consider that the Player has it's origin point at the bottom (at its feet) if it's in the middle, just do[code]Player.Y > scrollY + windowHeight/2 - Player.Height/2
   -> die[/code]
B
62
S
22
G
14
Posts: 1,481
Reputation: 16,405

Post » Sun Jan 06, 2013 10:03 am

You should put an invisable object in the centre of the screen, and set the game to scroll to it. Then have it move up the Y axis every x second/tick
Using R238 for all examples
B
66
S
20
G
6
Posts: 368
Reputation: 9,592


Return to How do I....?

Who is online

Users browsing this forum: blackhornet and 6 guests