The Daily Click ::. Forums ::. Klik Coding Help ::. Drag and drop problem
 

Post Reply  Post Oekaki 
 

Posted By Message

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
11th September, 2010 at 01:48:09 -

Hey TDC.

I'm currently working on a character creation thing with a friend but I have a problem.
Basically when I click and hold down the left mouse button on an object the object will follow the mouse until the mouse button is released. But, if I click on multiple objects, it will pick up every object clicked in any order, back to front, when I only want it to pick up the frontmost object.

The answer is probably pretty obvious, but I'm stumped. :| I'll try to clarify more if necessary. As always, any help is appreciated!

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
11th September, 2010 at 02:03:02 -

Use the "Select Object" extension:


+ User clicks with left mouse button
+ Mouse pointer is over "Object"
+ Select Object Extension: Select Frontmost "Object"
-> Object: Set XOffset to X("Object") - XMouse
-> Object: Set YOffset to Y("Object") - YMouse
-> Object: Set Flag 0 to ON

+ Object: Flag 0 is ON
-> Object: Set X Position to XMouse + XOffset("Object")
-> Object: Set Y Position to YMouse + YOffset("Object")

+ Repeat while left mouse key is NOT pressed
-> Object: Set Flag 0 to OFF

Edited by Sketchy

 
n/a

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
11th September, 2010 at 03:47:17 -

Sketchy, you're a life saver.

Thanks a bunch, man.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click