How to make a specific actor wrap? Not whole scene.

KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
edited February 2012 in Working with GS (Mac)
Hello all,
I am curious if there is a video already done or a template of this or if someone knows how and can help me. I am creating a distance game where I need the background actor to wrap so it is continuous. I DON'T want to make scene wrapping X true due to the fact that all the other actors coming at you will also wrap. I want those actors to destroy themselves after they are completely off stage. Hope I am clear enough and thanks in advance.

Thanks,
killerpenguins

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    Well , if you want to imitate a wrapping effect , try using the X (or Y value for the Y axis) value to achieve this , something like :
    For the right side -
    When self.position.X > 480
    Change self.position.X TO 0

    For the left side -
    When self.position.X < 0
    Change self.position.X TO 480

    Of course you need to change the values according to your project !

    Cheers
    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    P-O-M, thank you for the response. I just tried it with the background and it did not work. I believe I did it the way you were explaining because that is def not complicated but who knows.
  • POMPOM Member Posts: 2,599
    Does your background moves ? if so , to the left or to the right? there is no reason this won't work you just need to adjust it to your project .

    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    Sorry about that. My fault on that one. I put self.X > rather than <. It is working for the most part now except the fact that when it 's X is < zero and it sets its X to be > 480, it does a jerking motion. Is there a way to get make it flow?

    Thanks again,
    killerpenguins
  • POMPOM Member Posts: 2,599
    You need 2 actors for this and they need to jump places ..
    I made a quick demo for ya :
    http://www.mediafire.com/?ezugp60lqc3tzrn

    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    Thank you so much for taking the time to do that. It works almost perfectly. I think if I just adjust the image to be a little bigger it will work better. Right now after a couple times it "wraps" it shows the black line of where they should meet. Thanks again for taking the time to help. It is greatly appreciated and it means a lot to me!

    Thanks,
    killerpenguins
  • POMPOM Member Posts: 2,599
    edited February 2012
    Sure mate , glad it helped you ..
    Play with the values and with the sizes until you get a satisfied result .

    Now go kill some penguins ;)
    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    LMOA, but my name is killerpenguins, not penguinkiller. LOL It's a group of penguins who kill. LOL
  • POMPOM Member Posts: 2,599
    edited February 2012
    My bad ;) then go kill something with your group of penguins who kills :D lol

    Roy.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    Will do, thanks again!!! You have been a great help!!!
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Stack 2 similar back ground next to each other and use the same rule above. So you can get close to seamless connectivity.
Sign In or Register to comment.