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
18
S
5
G
4
Posts: 63
Reputation: 3,912

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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
60
S
17
G
6
Posts: 363
Reputation: 9,125


Return to How do I....?

Who is online

Users browsing this forum: h1k3, Unconnected and 0 guests