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?
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
Develop games in your browser. Powerful, performant & highly capable.
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
[attachment=0:186nyz9i][/attachment:186nyz9i]
[attachment=1:186nyz9i][/attachment:186nyz9i]
Hope that helps.
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
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.
You have to download the latest beta:
www . scirra . com/construct2/releases/r165