How to make my character disappear at one location/appear at another?

jigglybeanjigglybean Member Posts: 1,584

Hi all,

I am trying to figure out the best way for my hero to vanish at one location on the scene, and appear at another - like in this demo of Cut the rope when the candy vanishes down the hat and appears the other side? Any tips or video links welcome.

  • thanks in advance

Like Balls? Then click here! We've 100 coming soon

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    Here is one way:

    When overlaps or collides with actor 
        Change attribute self.position.x To: (new_X)
        Change attribute self.position.y To: (new_Y)
    
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    When candy actor collides with actor [right hat] Change attribute self.Position.X to 100      Change attribute self.linear.velocity.Y to 500

    (Assuming the left hat actor is at x=100)

    You'd probably want a "mask" actor that is smaller than and slightly below the right hat and then use that for the collision rule so that the candy can actually drop inside of the hat rather than moving as soon as it touches the top edge of the hat.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • jigglybeanjigglybean Member Posts: 1,584

    cheers chaps, I will give this a whirl

    Like Balls? Then click here! We've 100 coming soon

Sign In or Register to comment.