No touch, multitouch, nothing?

The only way to interract in the game with mouse is if keypress with cursor position check??! Why?!

GDevelop gives far more interaction possibilities.

In the conditions area you will find joystick, keyboard and mouse functions.
If you look under “Sprite” you will find “Mouse->the cursor is on an object”.
Looking under “Mouse and touch” you have tests for mouse buttons clicked and cursor x/y positons.

If you take a closer look at “other functions” when creating expressions, you will find another “mouse and touch”, where you can even get the Mouse Wheel displacement.

Are there additional functions you’d require?

Please tell me im missing something! I need simple multitouch controlls :frowning: Maybe, there are some object types (sprites) that can support simple onclick triggers?? Im really new into gdevelop

That’s under

“Sprite” you will find “Mouse->the cursor is on an object” - in this case it must be on a sprite
Add a “mouse and touch->mouse button down or touch held” condition and that should do it.

Videotas thank you 4 your reply. I need onclick trigger on a sprite (touch pad) because cursor cannot be on two places at the same time

GDevelop does not support multitouch, you can only get one click/touch.

And it doesnt even interract instantly because of the cursor position requirement for the event… :frowning: So not even single touch controlls work well with this, sometimes u have to double touch to trigger

It might look like this:
answer001.gif

Don’t understand your problem, just test if the mouse button is down/screen is touched and the position of the click/touch : everything should be ok.

@videotas : the AND condition is not mandatory, it’s already the default behavior when you put multiple conditions into an event.

Thank you very much for that information - I have already been wondering why it works with and without the &.

AND is useful only when used inside an OR condition for example. :wink:

I have the same experience with mouse and sprite events on a touch screen, it doesn’t work properly in all cases. but maybe it a performance problem as I have tested on my low-end device it may works better on a high-end device with better quality touch screen and better performance.

However, in games using different engines I have less problem with touch even on this cheap device, so it could be improved in GD anyway.

I must admit, even using just simple mousepointer->sprite collision checks without any touch screen or touchpad, I experience the strange behavior that for maybe 70% of the clicks the action follows and for 30% of the clicks it did not start the action.
As I don’t need the pixel perfect collision (the sprites to test are all squares of identical size) I set the “no” flag for pixel precise collision testing, which results in around 90% successful clicks vs. 10% clicks without the following action.
This is for the preview - haven’t compiled the project yet, as I am still stuck with the problem I described under:
http://www.forum.compilgames.net/viewtopic.php?f=19&t=6053&sid=8fe071fc1c070ffbe12426c4684d484e

It uses webgl engine the problem is in the scripts only. Cursor dependent events will never work well with touchscreens and without touchscreen support, whats the point of making html5 app? Isnt the purpose of html5 the cross device epicness? :slight_smile: I have already implemented touch events in the code but its just a time cosuming annoying work needs to be done every single time after compiling the app (since it deletes the old files in the folder) as is implementing Jquery and meta tags mentioned in my previous topic. Would be really nice to make an extension or even better implement some other click/touch events in the next version. I really cant see how could you do something serious without touch screen support these days ^^

Strange behavior because GDevelop process the touch events (but single touch event) the same way as the clicks.

Again, GDevelop supports touchscreen (but single touch)…

Ofcourse it does but the way it does it is not useful. Try a simple left-right touchpad how it works with the cursor position check yourself. It is not reliable → useless

Are you talking about a touch screen ? because this is a touchpad :

Yeah, touch screen virtual controls “gamepad” ? :smiley: thats what i mean :slight_smile:

As Victor, I really do not understand at all what’s your problem.
Multitouch is not supported but single touch is perfectly working each time I tried it.

If you want to make your modification permanent, just modify the index.html in the folder JsPlatform/Runtime (in the GD installation directory), but be warned that you are responsible for your modification and I won’t try to fix bugs if anything goes wrong with a custom index.html. :slight_smile:

EDIT: Ok so you were talking about having a virtual gamepad. For now it won’t work if your virtual gamepad needs for more than one touch on it to be used indeed.

I am happy to correct my statement about the 10% misclicks - now with version 3.6.78 every mouseclick/touch in collision with sprite is working in my project.
I did not change the project, so the improvement came with version 3.6.78.