hover in touch

Get help using Construct 2

Post » Fri Jul 05, 2013 11:56 am

can any one tell me, how to give the hover using touch.

Actually i'm having 3 objects ,in mouse click i have given hover for 3 objects and the 3 objects moving with mouse, but in touch it is not moving, with touch, can any one please tell me
B
5
S
2
Posts: 91
Reputation: 738

Post » Fri Jul 05, 2013 12:02 pm

touch.x and touch.y only have a value while touching. If your finger is not touching the screen the value will be 0

Mouse.x and mouse.y however always have the value of where the mouse-pointer is regardless of if the button is clicked.

So when making something for a touch device, you should always be aware that there is only input while touching.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jul 05, 2013 12:10 pm

Thanks LittleStain,

it's working cool, but i have another problem,in mouse events after droping one object it will take another object on the mouse cursor, but in touch it's not taking like that.do you have any idea.
B
5
S
2
Posts: 91
Reputation: 738

Post » Fri Jul 05, 2013 12:19 pm

In touch there is no cursor. And it is impossible to follow anything that doesn't exist. You could compare touch (at least single touch) to a mouse only working when the left mousebutton is down.

Dropping an object in touch-mode usually means taking your finger of the screen, so all input is lost. You could try to use events to change between dragging objects, but that really depends on how your game is set up.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jul 05, 2013 12:24 pm

Thanks littlestain.
B
5
S
2
Posts: 91
Reputation: 738

Post » Fri Jul 05, 2013 12:38 pm

by "touch event: Is touching object" the object is moving and after droping that object. with out touch next object has to come on the touch display.can any one share your idea please.
B
5
S
2
Posts: 91
Reputation: 738

Post » Fri Jul 05, 2013 12:57 pm

I don't quite understand what you mean by touch-display.
These things can be different for different games.

Maybe this will work. On drop sprite z-order move to bottom of layer, that way the object will be behind the other dragdrop object so you can move the one that was behind it.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, evillair, Google [Bot], unicornspitfire and 13 guests