Scrolling background with limitations
SingleSparq
Member Posts: 1,339
I have been able to set it up to scroll a background the opposite direction when I move my player (so moving player right has the back ground move left slightly) I have done this by telling the background that if the right is pressed move left.
My background is wider than the scene width so that when it moves, it is not showing the edges (not using a wrap). But what is the best way to stop it from moving completely at a certain point (like when I reach the end of the scene width) so that even though I'm pressing right button the background stops. I have tried a few things but looking for the best way to control it. I control the player from getting to a certain point in the scroll scene using borders - should the same be done with a background?
My background is wider than the scene width so that when it moves, it is not showing the edges (not using a wrap). But what is the best way to stop it from moving completely at a certain point (like when I reach the end of the scene width) so that even though I'm pressing right button the background stops. I have tried a few things but looking for the best way to control it. I control the player from getting to a certain point in the scroll scene using borders - should the same be done with a background?
Comments
If right key is down
If "background" is < (wherever you want it to stop)
Then move left