Movable Scene

Alright, So I am working a basic shooter game to get my feet wet. Where I am struggling right now is with the moving background. What I have now is a background (blue sky 480x320) which I have and want to stay stationary. On top of the background, I have placed a .png of a skyline (480x320) and I want it to scroll by and then repeat. What must I do to make this happen? Thanks in advance.

Comments

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    To keep the background still create a layer. Move it to the bottom of the stack. Uncheck scrollable and put the background actor in there.

    For the skyline you can tile the actor for the length of the scene and set its horizontal wrap to tile
    Here is a paralax tutorial:
  • lpetrowiczlpetrowicz Member Posts: 12
    I watched the video and believe I understand what you are saying but if I to understand it, it won't continually move in this way, will it? I am wanting from the time I hit start, the skyline to scroll left to give the affect the plane continuously flying. If I misunderstood, please let me know.
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    Create an boolean attribute called flying. Whenever the plane starts flying change that to true.
    Inside the paralax actor: when game.fly is true (Do paralax motion)
    This way whenever the plane is moving the skyline is too. Just make sure to tile the actor the width of the scene, and turn on Wrap X.
Sign In or Register to comment.