Keeping the character inside the screen

Get help using Construct 2

Post » Sat Mar 29, 2014 6:23 pm

How do I keep my character inside the screen?
let's say this is a game like CONTRA where you walk to the right and the scroll follows you. but then you go back to the left and the screen doesn't scroll in that direction to keep you advancing, and you can't go beyond the screen to the left.

How do I keep my character from going beyond the screen to the left?
B
5
S
1
Posts: 92
Reputation: 609

Post » Sat Mar 29, 2014 7:23 pm

U can make a "solid" Tall Object that moves when you hit right ....but it don't when you hit left so when you come back you will hit it
B
9
S
2
G
3
Posts: 10
Reputation: 2,398

Post » Sat Mar 29, 2014 8:19 pm

I made an example now, I do not know if it's the best solution at least works.

A change may be putting this function

GaloDoido794_NoScrollLeft.capx


GaloDoido794_NoScrollLeft.capx


Hope that helps.
You do not have the required permissions to view the files attached to this post.
B
5
G
1
Posts: 23
Reputation: 398

Post » Sat Mar 29, 2014 8:54 pm

And when moving the camera, you can set its position to max(target.X, self.X), this way it never moves to an X position lower than its current X
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Mon Mar 31, 2014 4:47 am

somehow I can't make that file work. Construct says it was made using version 165, but 163 is the newest I can find here.
B
5
S
1
Posts: 92
Reputation: 609

Post » Mon Mar 31, 2014 8:54 am

You have to download the latest beta:

www . scirra . com/construct2/releases/r165
B
3
S
1
Posts: 7
Reputation: 341


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk and 66 guests