Looping Background Help!
Gamexcb
Member Posts: 179
I am working on a game and we have a background that we want to loop. We have two background tiles and we need them to move out toward the left of the screen and then move in the left. I have used Wrap X and Other methods but when the tiles go to the right of the screen they come apart revealing a tear! Any ideas? Help would be much appreciated!
-Gamexcb
-Gamexcb
Comments
If so, try this:
Have a background actor that is 480 by 320. Drag 2 instances into the scene and place ones X position at 0 and the others X position at 480. This should place the 2 background instances right next to each other, connecting in the center of the screen and 2 halves hanging off both sides.
Set up some rules in you background actor like so:
Move Left: Speed 50 (any number based on preference)
Rule: When attribute self.position.x is = -240
--Change attribute self.position.x to 720
So when each actor moves off the screen on the left, it will move it all the way to the right off screen just behind the other background actor and keep looping over and over.
Let me know if that makes sense or is even close to what your looking for! Hope it helps!
Maybe post a demo of problem so we can fix