The Daily Click ::. Forums ::. Klik Coding Help ::. Click and drag
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
27th June, 2003 at 12:52:54 -

Can I make a click and drag effect like there is a man and I want to make him by chosing different sections and putting them together, Is it possible to do it in TGF or MMF?

 

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
27th June, 2003 at 13:10:26 -

Ok, here is a simple way of doing it:
Events:
. Repeat while left mouse key is pressed
+ Mouse pointer is over Torso1

Actions:
Torso1 -> Postion -> Set X co-ordinate to XMouse , Set Y co-ordinate to Y mouse

That should work because I tested it out.

 
My signature is never too big!!!

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
27th June, 2003 at 13:14:38 -

Also, make sure that the hot spots of the objects are in the middle, because it will work easier then.

 
My signature is never too big!!!

BobFromPikeCreek



Registered
  25/08/2002
Points
  288
27th June, 2003 at 13:35:34 -

That kinda sucks because if you move the mouse too fast then the object will slip out from under the pointer. Here's my way, it works perfect:
* User clicks on Object 1
= Set Counter to 1

* Always
+ Counter equals 1
= Object 1> Position> Set X Co-ordinate to XMouse, Object 1> Position> Set Y Co-ordinate to YMouse

* [NEGATE] Repeat while mouse is clicked
= Set Counter to 0

I just tried and this is flawless.

 
Image
Image

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
27th June, 2003 at 13:49:17 -

Yea, I didnt really think about using counters. The one I did works ok, but yours is better.

 
My signature is never too big!!!

BobFromPikeCreek



Registered
  25/08/2002
Points
  288
27th June, 2003 at 14:22:09 -

Your's is fine if the object is large, but if it's a smaller object and you move the mouse too fast, the object gets left behind and is no longer under the mouse pointer.

 
Image
Image

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
27th June, 2003 at 14:45:17 -

It wasn't bad, seeing as I've never done drag drop before.

 
My signature is never too big!!!
   

Post Reply



 



Advertisement

Worth A Click