toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Dragging multiple items. ANYONE!?
swiftskater1
Member
Posts:
97
January 2010
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
firemaplegames
Member
Posts:
3,211
January 2010
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
swiftskater1
Member
Posts:
97
January 2010
Okay. But now when two are pressed at the same time they dont move right.
firemaplegames
Member
Posts:
3,211
January 2010
Oh, you're using multiTouch?
Try changing MOUSE to TOUCH and see if that works...
swiftskater1
Member
Posts:
97
January 2010
Alright one sec.
firemaplegames
Member
Posts:
3,211
January 2010
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...
swiftskater1
Member
Posts:
97
January 2010
max(min( game.Mouse.Position.Y ,480),0). Thats part of my constrain attribute. How would i put that with touch?
firemaplegames
Member
Posts:
3,211
January 2010
in the expression editor, where you wrote that formula, you have access to TOUCH1 under Devices...
swiftskater1
Member
Posts:
97
January 2010
So instead of game.Mouse.Position.Y. Use game.touches.1?
firemaplegames
Member
Posts:
3,211
January 2010
yes, try that.
swiftskater1
Member
Posts:
97
January 2010
No dice.. Can you just help me make a new actor? With a drag motion? But not constrained to the mouse?
firemaplegames
Member
Posts:
3,211
January 2010
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.
swiftskater1
Member
Posts:
97
January 2010
Okay. Thanks
Sign In
or
Register
to comment.
Comments
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
Try changing MOUSE to TOUCH and see if that works...
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...
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.