Simulate mouse click (with touch)

0 favourites
  • 9 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hi Guys,

    So, I've got a lot (dozens) of context sensitive events which are triggered by left-mouse click.

    Now, I'd like to add touch controls, but rather than add a custom touch event for each context, I'd like to simply have a Touch condition where "Is touching <object>" simulates a Mouse left-click.

    That way I could create a simple mouse icon, and touching it would simulate a left-click, triggering the event.

    I've read through the touch tutorials, but nothing seems to cover this situation.

    Thanks!

    (I should be able to have something to share real soon :))

  • You don't need a custom plugin for that. It is built in.

    Use the Touch-Plugin and look at the properties on the left side. There you can set that the Touch-Plugin listens to "Mouse-Input" - i.e a mouseclick is interpretet as on-touched-event. No you can replace all Mouse-click-events with Touch-events and finally delete the Mouse-object - but only if you do not use mouseover-events and similar.. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • What about difference between left and right click?

    Will they both be interpreted as on-touched-event?

  • I have had lot of trouble using that mouse input setting. It doesn't seem to work as needed. If you make it for mobile devices, then important thing is to make sure you don't refer to Mouse.X,Mouse.Y anywhere.

  • The only way I remember anyone implementing such a feature was when keeping some object pressed, a menu would appear. There's no way to simulate mouse button presses by touch, of course.

  • TouchMouse plugin does not maintain anymore. Sorry.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have had lot of trouble using that mouse input setting. It doesn't seem to work as needed. If you make it for mobile devices, then important thing is to make sure you don't refer to Mouse.X,Mouse.Y anywhere.

    Which part did you have trouble with? I've had success with it so far. Instead of Mouse.X etc, use Touch.X

  • You don't need a custom plugin for that. It is built in.

    Use the Touch-Plugin and look at the properties on the left side. There you can set that the Touch-Plugin listens to "Mouse-Input" - i.e a mouseclick is interpretet as on-touched-event. No you can replace all Mouse-click-events with Touch-events and finally delete the Mouse-object - but only if you do not use mouseover-events and similar.. <img src="smileys/smiley1.gif" border="0" align="middle" />

    Ah, this is an interesting idea. Still a bit more labor intensive than I'd like as it requires replacing probably more than a hundred mouse click events, but something to consider.

    As mentioned, this also doesn't really help in the case where I need a right click (about 1/3 as often as left click, but still often).

    In my situation a simulation would be the ultimate time saver, but... sounds like there's not much I can do.

    I've also discovered that iOS performance is awful (about 1/4 that of a pc based browser, even after I've tried all the performance tricks), and I'm running into all the sound issues everyone else has with html5 (basically, none of it works). So, with that in mind I'm getting less and less motivated to get it working.

    Kind of a bummer, but it's ok.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)