Is there a way to loop an actor's position?
omoreno16@wcsmiami.org
Member Posts: 10
im basically trying to make an actor move across the screen and when it gets to the the end of the screen, start at the beginning of the screen and repeat his motion. any suggestions? something like a loop but you cant use loop and move.
Comments
anything will help
You can do this several ways, the obvious first choice would be simply to set your scene to wrap.
Go to Scene > Attributes > and check Wrap X.
Try this:
When self.position x > screen.size width + self.size width/2
-Change attribute self.position x to 0 - self.size width/2
Or if it fits your project, you could turn on Wrap X. In this case anything that leaves the screen on left or right, will come out at the opposite side of the screen.
Mental Donkey Games
Website - Facebook - Twitter
Thank you so much guys. new to gamesalad