Quick question on clicking and moving objects

BlueFanStudiosBlueFanStudios Member Posts: 77
edited November -1 in Working with GS (Mac)
So basically I have a few different objects moving around the screen. You can grab these items a flick them around. problem is if i grab one item and the move that over another, it picks up that item too. I was wondering if there is a solution to this problem, because i really need it only grabbing one item at a time.

Comments

  • AsymptoteellAsymptoteell Member Posts: 1,362
    Make it so when one is being dragged, a Boolean game attribute (call it draggable) is turned to false. Otherwis change it to true, and make dragging in all objects only possible if draggable is true.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Make sure your using touch is pressed and not inside

    inside means the touch just has to move inside the actors boundaries for the rules to trigger where pressed means you actually have to press down on that actor before the rules will trigger
  • BlueFanStudiosBlueFanStudios Member Posts: 77
    Thanks for the suggestions - there is a fair few objects so they'll take a while to code in - in the meantime keep the ideas coming.

    Edit - It was because of the inside code - I removed that and i works fine now - Thanks again.
Sign In or Register to comment.