Make actor not leave screen? Or make him appear on the other side?

HyryttyHyrytty Member Posts: 39
edited November -1 in Working with GS (Mac)
Is this possible? I want my object, that in this case is a dog, which is controlled by accelerometer, not to be able to leave the screen. When he comes to the end of the screen i want him to stop? I can't find any tutorial about this anywhere on the internet. And also it would be even better that if he leaves the screen he appears on the other side? Like if he leaves on the left side he reappears on the right side? Is this possible?

Thanks in advance,

Comments

  • HachikoHachiko Member Posts: 330
    Yep, without rules. Go to scene, attributes of the scene, search for wrap X and check the box.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    To keep him walled in just create an actor and call it wall. Put it covering each side of the game area, and put a rule that it's collidable with actor dog
  • HyryttyHyrytty Member Posts: 39
    Hachiko said:
    Yep, without rules. Go to scene, attributes of the scene, search for wrap X and check the box.

    Thanks for the quick answer! Does this make the object not able to leave the screen? If so, do you also know how to make him reappear on the other side? Thanks
  • UtopianGamesUtopianGames Member Posts: 5,692
    If you want him to stop when he reaches the edge of the screen do something like:

    Rule...if x position >0 move left.

    But like Hachiko said if you want a wrap do that.

    Darren.
  • HyryttyHyrytty Member Posts: 39
    Thanks for the help! The wrap helped me achieve what I wanted, except one issue appeared. When I wrap the top and left sides become darker than the other sides? Also the image is chopped and pasted, it looks weird? Anyone knows what I'm talking about and knows how to solve it?
  • HyryttyHyrytty Member Posts: 39
    NahirC said:
    Thanks for the help! The wrap helped me achieve what I wanted, except one issue appeared. When I wrap the top and left sides become darker than the other sides? Also the image is chopped and pasted, it looks weird? Anyone knows what I'm talking about and knows how to solve it?

    Ah nevermind solved this issue :) It was because the background image was too large for the screen!
Sign In or Register to comment.