Problem: Hold mouse and enable drag

Get help using Construct 2

Post » Thu Jul 18, 2013 12:22 pm

I find myself trying to find a solution to perhaps an obvious problem? I have some code that enabled drag&drop after pressing the mouse down on an object for 0.5 sec. I've verified that it works since both a test scaling of the object works, as well as checking for the "Is enabled" condition.

The problem is that the drag event doesn't take effect until i release the button and click & drag again. I need it to start following the mouse immediately so is there anyway for the built in behavior to work or do i need to write custom code?

This is the current setup:


On a side note this forum seems to have an issue with me taking too long time to write my topics since it gives me an error every time that my session time is up. >.<hdnine2013-07-18 12:28:56
B
7
S
2
Posts: 38
Reputation: 555

Post » Thu Jul 18, 2013 1:03 pm

the Dragdrop enabled just mean that drag and drop is now possible for that module. Not that you will start dragging it.

You will probably have to make your own drag and drop, but it is not that hard.

just set module.x to mouse.x and module.y to mouse.y while dragging.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Thu Jul 18, 2013 1:16 pm

[QUOTE=cvp] the Dragdrop enabled just mean that drag and drop is now possible for that module. Not that you will start dragging it.

You will probably have to make your own drag and drop, but it is not that hard.

just set module.x to mouse.x and module.y to mouse.y while dragging.[/QUOTE]

Right as i suspected... thanks
B
7
S
2
Posts: 38
Reputation: 555


Return to How do I....?

Who is online

Users browsing this forum: beohs, Elliott, Yahoo [Bot] and 13 guests