Hi there community,
I designed a UI for walking my character right/left and another UI for shooting Primary and Secondary weapons.
Everything works fine while testing on PC, I can press right and the character will walk right and If I also click the Primary shoot It will also shoot while walking.
But I am having a problem when exporting my game on mobile devices. On mobile it either walks or shoots so if for example the character is walking and I click the shooting UI it will stop and shoot.
I think its an issue with the multitouch which is everything by default but I cannot find the right solution for this.
Any help is welcome!
Did you use the multitouch events?
Share a screenshot of your events if you did. Use them if you didn’t. There should be an example to show you how.
Thanks for the response. I think I use multitouch events if I am not mistaken.
here a screenshot:
The first group is for the shooting animation (I have the actual trigger on other group) and the second group isfor the Left/Right Simulation.
Is there anything else that I am missing?
Those are the normal touch events. Under mouse and touch, there’s multitouch. try using those instead
I have just checked and they are in multitouch. However, they are combined with the “The cursor/touch is on Object” which I don’t know if that influence…
They aren’t IN multitouch, they’re UNDER multitouch. if you click multitouch there, it will show you the multitouch events
arrow down means the group is not open.
ouch! I really didnt see that…
However, I am not able to make it working. I checked the multitouch example on Gdevelop but I cannot make it work on my project.
I replaced the previous condition with “A new touch has started” but when exported It really does nothing, it doesn’t even move. I am probably applying it incorrectly…
You have any idea how the conditions and actions should be written for this purpose?
i never worked with those.
but when looking at your event, i assume that the
a new touch has not started condition would always be true, unless you do a new touch every frame.
try to work with a touch has ended.
thanks for the reply Slash, I will try with those too.
I have just found a Github example here: GitHub - ayushraj1024/PlatformerMultitouch: This is a Gdevelop 5 game in which we have implemented multitouch controls for a platform game
I think this is what I was looking for but still have to check. I need to order my conditions a little bit before that though.