So very confused with HTML5 multitouch movement

sokaroka.itch.io/pet-rancher?se … jayKIOOLOY

You can go here on your phone to test it.

Pressing up left makes the character move both up and left at 100 p/s.
Pressing up right does the same but for up and right.
If you press them both at the same time the left and right are negated and the character moves just up at double the speed.
This was my logic to figure that multitouch was definitely working.

Ok now on to the problem.
Here’s the related code.

So yes movement is enabled and MoveUp is touched.
The third one is simply to simulate a touch hold when I’m testing it on the PC browser.

Now my problem was originally that when I just tapped MoveUp on my phone the force stuck to the character after my finger came off the phone. So I figured I need a sub-event to delete the force once the finger is removed.

This SEEMED to work, if you hold down on MoveUp you only move up until you release your finger.

However if you use another finger to tap anywhere on the screen the character stops moving, even if you continue holding MoveUp.

What’s weird is that the sub-event doesn’t seem to be doing BOTH its actions.

I mean I thought it worked because it made the player stop when you release the up button which only started happening after I added the sub-event.

The player stops, but the text of the “testtt” word you can see on the screen doesn’t change.

If the only condition is that a touch has ended, the character stops and the text changes.
If there’s also a check to see if there’s no separate touch on MoveUp the character stops whether you tap somewhere on the screen with a second finger or remove your first touch, but the text doesn’t change, only half the actions happen?

What in the world is going on?

Its stops because “A touch has ended” condition becomes true. You need to test if it’s the same touch that ends.
By the way, the “AND condition” is useless (there is already a “AND” between all conditions by default).

I also don’t understand why you need the second event. It should work with the first one only.

Also, not sure at all if the second event has possibilities to be launched, since it is a sub-event with a condition inverse from its parent (cursor over object, cursor NOT over object) :confused:
Anyway, the way GD chooses to launch the event without instances because no instances fulfils the conditions, or doesn’t launch the event at all is a mystery for me, one day I should make some tests…