catching dropping objects

AKBAKB Member Posts: 7
edited November -1 in Tech Support
Hello,

I have a plate that's movable my touch. The user, through moving the plate, tries
to catch items dropping. How can I have items that are caught or touch the plate
stick to the intial position they touched the plate at. Details would be very helpful,
as I am relatively new to GameSalad.
Thanks!

Comments

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Create a rule so that it says if the plate touches or overlaps with the dropping item. Then put a constrain attribute behavior in the rule that constrains the plate's X and Y motion to 0.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Mr.Rinoy said:
    Create a rule so that it says if the plate touches or overlaps with the dropping item. Then put a constrain attribute behavior in the rule that constrains the plate's X and Y motion to 0.

    That wont work. The items will stop moving. You want them to move with the plate.

    You need to constrain the plate's x position to a global integer attribute (call it game.plateX or something).

    Then in the falling item:

    Rule - when actor collides/overlaps with plate
    constrain self.position.X to game.plateX
    constrain self.position.Y to (whatever the Y value is for the plate as I am assuming you are only moving it back and forth.)
Sign In or Register to comment.