Question about right clicking and Touch behavior

Get help using Construct 2

Post » Fri Jul 01, 2016 5:10 am

I made a game a while back that was intended for a touch device, so (obviously) I made heavy use of the Touch behavior to handle inputs. Recently, I made the game available to non-touch devices via browser, which seemed like it would be an easy translation since Construct 2 allows left clicking on the mouse to behave as a touch input.

You can play the game here: https://virtually-competent.itch.io/tune-it-up

However, one of my friends came across an interesting bug. If you right click instead of left click, it seems as though it treats that as a different sort of input (maybe a tap instead of a touch that can be dragged?). When one of the four seed bags in the corners are "touched", they spawn a flower that can be dragged onto the field. If the flower is spawned and dropped outside of the field, it should be destroyed.

This works as expected with a left click, but when you right click, it spawns a flower and immediately drops it, but doesn't destroy it. This is unexpected behavior.

It's been a few months since I looked at the project, so I'm not excited about going through and updating all the events to explicitly use Mouse inputs when on a non-touch device. If I have to do that in the end, I suppose that's fine, but I'm curious to learn more about why this problem is a problem. Is right clicking supposed to behave differently on Touch events than left clicking, or is this some sort of bug? Personally I feel like it either shouldn't accept right clicks at all or treat them exactly the same as left clicks.
B
14
S
2
Posts: 73
Reputation: 794

Post » Fri Jul 01, 2016 11:45 am

Thats because you are using drag & drop behavior. Use touch 'is touching object' as conditin then set position to Touch.X, Touch.Y.
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Sun Jul 03, 2016 12:40 am

Cool, I'll try that. My question still stands though: Is right click treated as a "tap" instead of a hold (like left click seems to be)?
B
14
S
2
Posts: 73
Reputation: 794


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION, zenox98 and 14 guests