Dragging multiple items. ANYONE!?

swiftskater1swiftskater1 Member Posts: 97
edited November -1 in Working with GS (Mac)
I need to drag multiple items. But it is the same actor. I have it follow the mouse position. And when i have more then one it controls all of them. I want it to be seperate drags

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    make sure you are using the Mouse is INSIDE condition as well...

    i.e:

    Rule
    When MOUSE is DOWN
    When MOUSE is INSIDE
    Change Attribute: self.dragging to TRUE
    Otherwise
    Change Attribute: self.dragging to FALSE

    Rule
    When self.dragging is TRUE
    Constrain Attribute self.PositionX to MouseX
    Constrain Attribute self.PositionY to MouseY
  • swiftskater1swiftskater1 Member Posts: 97
    Okay. But now when two are pressed at the same time they dont move right.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Oh, you're using multiTouch?

    Try changing MOUSE to TOUCH and see if that works...
  • swiftskater1swiftskater1 Member Posts: 97
    Alright one sec.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    and instead of MouseX, it will need to be Touch1X and Touch2X etc...

    It will start to get tricky, you will need to keep track of touch counts as well...

    I haven't done any multitouch stuff yet, so I'm not the best one to answer this...
  • swiftskater1swiftskater1 Member Posts: 97
    max(min( game.Mouse.Position.Y ,480),0). Thats part of my constrain attribute. How would i put that with touch?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    in the expression editor, where you wrote that formula, you have access to TOUCH1 under Devices...
  • swiftskater1swiftskater1 Member Posts: 97
    So instead of game.Mouse.Position.Y. Use game.touches.1?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, try that.
  • swiftskater1swiftskater1 Member Posts: 97
    No dice.. Can you just help me make a new actor? With a drag motion? But not constrained to the mouse?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I'm not sure I understand? You want to drag an Actor, but NOT have it constrained to the user's Mouse(or Touch)?

    I have to go out for a bit, I'll be back online later... I'll try to help you out the best I can.
  • swiftskater1swiftskater1 Member Posts: 97
    Okay. Thanks
Sign In or Register to comment.