Going from one side and coming from other

SANDEEP410SANDEEP410 Member Posts: 46
edited May 2012 in Working with GS (Mac)
I want an object if it goes from the left part of screen then it should appear from the right part of the screen.
Anyway how to do that
I mean it shouldnt directly telepoart from one end to other.If my half part of the object is in left part then other half should be seen in right part

Best Answer

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    edited May 2012 Accepted Answer
    then change the values so they move off screen first and appear offscreen on the other side, or even better use there width to do it.




    When self.position.x > 480+(self.size.width/2)
    change self.position.x to 0-(self.size.width/2)

    As far as having it appear on both sides like it does when you have wrapped checked, you cant do that without actually using wrap

    You might be better off putting walls around the edges of your scene in a little bit and unchecking moveable and set the restitution to 0 on them. And any actors you dont want to wrap have them collide with those walls. If you want the actual wrap function.

Answers

  • MotherHooseMotherHoose Member Posts: 2,456
    @SANDEEP410 … you are new to GS … so big,big Welcome!

    please download the GameSalad Manual
    …click in the purple text in the description to download … and open
    the effect you want is a sceneWrap on the X or Y position
    … type in Wrap in the searchTool of that pdf

    when you get that working …
    good to do the online GameSalad Cookbook tutorials … and watch some videos
    and read/reference the Manual often!

    Enjoy your adventures in GameSalad!

    image MH
  • SANDEEP410SANDEEP410 Member Posts: 46
    Hello i used warp screen to acheive the above.However i want some actors not to use warp screen.So how to go about that.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Then do it manually in the actors you want to wrape.

    When self.position.x > 480
    change self.position.x to 0

    When self.position.x<0
    change self.position.x to 480
  • SANDEEP410SANDEEP410 Member Posts: 46
    Well i did this but the problem is They are just teleporting if they reach at the end of the screen.
    I mean animation is not perfect that is half part of actor doesnt appear in both side like it does in warp enabled.
    Other thing is since i have lots of actors one after the other going from left to right the distance between them keeps on changing
  • alexconsincalexconsinc Member Posts: 54
    Thanks. By the way, how would I do if he goes up, he appears down, and vice versa
  • alexconsincalexconsinc Member Posts: 54
    EDIT: Managed to figure it out. Thanks a lot
Sign In or Register to comment.