Drag and Drop a Textbox+Progressbar

Get help using Construct 2

Post » Sat Feb 21, 2015 3:42 pm

Hi,

is there a solution for not floating up and down while draging the Sprite? :?

example

greets
B
8
S
4
G
1
Posts: 10
Reputation: 881

Post » Sun Feb 22, 2015 2:11 am

Wow. That's so strange but so Cool!
Why would you want to remove that interesting floating effect?
B
11
S
3
G
1
Posts: 91
Reputation: 997

Post » Sun Feb 22, 2015 4:05 am

I was going to suggest the Pin behavior, since that seems to keep objects stuck together most of the time, but you are already using it. I'm guessing it has to do with the order in which C2 calculates movements: the drag&drop gets computed after the pin behavior, and then the layout is drawn before the Pin can fix it. I have no idea how to fix it though :(
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Sun Feb 22, 2015 11:03 am

Try this:
Instead of giving a drag and drop behaviour to the blue shape, add this event and remove the "drag and drop" behaviour:

When mouse button is down: set "blue shape" position to mouse.x, mouse.y

Or, if you want to do it for mobile devices:

On touching screen : set "blue shape" position to touch.x, touch.y

Anyway tomorrow I'll be home raedy for fixing it if you will still need help :) these events are just a quick idea on how to fix that
B
11
S
3
G
1
Posts: 91
Reputation: 997

Post » Sun Feb 22, 2015 1:54 pm

Code: Select all
set "blue shape" position to mouse.x, mouse.y


Change nothing same issue :/
B
8
S
4
G
1
Posts: 10
Reputation: 881

Post » Mon Feb 23, 2015 4:28 pm

push
B
8
S
4
G
1
Posts: 10
Reputation: 881

Post » Mon Feb 23, 2015 9:16 pm

I've tried many solutions but it still gives the strange delayed movement. :(
B
11
S
3
G
1
Posts: 91
Reputation: 997

Post » Sun Mar 08, 2015 12:38 pm

me to but thanks anyway :]
B
8
S
4
G
1
Posts: 10
Reputation: 881

Post » Wed Mar 18, 2015 8:43 pm

@tschind0w

I think that you need "every tick" and x,y positions in order to work.
EDIT:
nah.. thats not either... did you try to post under BUG report?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Tue May 12, 2015 4:38 pm

No but good idea.
B
8
S
4
G
1
Posts: 10
Reputation: 881


Return to How do I....?

Who is online

Users browsing this forum: Fatsquid, ruannmelgaco, Turaco and 1 guest