Multiple Drag and Drop Actors

iPhoneDevForMeiPhoneDevForMe Member Posts: 362
edited November -1 in Working with GS (Mac)
I have 2 actors that have rules set up so it can be touched and moved. Im having an issue where when im dragging one actor, if I overlap with the other it picks that actor up as well. Ive been playing with this for awhile and cant seem to get this to work, any ideas? Thanks!

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You need to have another global boolean game attribute called something like "isDraggingObject".

    When you pick an object up, set game.isDraggingObject to TRUE
    When you drop an object, set game.isDraggingObject back to FALSE

    And only be able to pick up an object if game.isDraggingObject is FALSE
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    @firemaplegames

    Thanks alot! I knew it was going to be something simple!

    By the way, I purchased your app Danger Cats and I have to say, I love that game!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Glad I could help! Thanks for the support!
  • paranoid_androidparanoid_android Member Posts: 22
    What happens when the actors start on top of each other, how can you distinguish the two. @PA
  • spaceneedlespaceneedle PRO Posts: 93
    @paranoid_android you can't really .. i have noticed it will prefer the bottom layer first...which is completely opposite of what the user was trying to do.
Sign In or Register to comment.