That’s a little tricky to do, but I think I know how you can do it!
If you want to hide the controls in the screen, you can do that in the events. I can go in detail about how to do it if you want, but the basics of it are just to use the “Common Actions For All Objects > Visibility > Hide” action and choosee the controls. ^^
And now, in order to be able to move the character on the screen with the tap of a finger…
What we want is to get the X value of the tap when the player taps the screen, in order to know when they’re tapping the left, the right, or the center. We can do that!
I don’t know, however, your Scene’s width nor the height, which makes this a bit complicated - but I’ll try and do it just through expressions; so it will work in every case regardless of the screen size!
First of all, we need to make a new layer.
In order for any of the events below to work, the touch needs to be in ITS OWN LAYER. Let’s create another layer, and call it “Touch”.
ALL OF THESE EVENTS should be SUB-EVENTS of this event:
If touch or Left mouse button is down:
// Move Left //
If cursor X position is < SceneWindowWidth() / 3
simulate pressing Left key for Player
flip horizontally Player: yes
( This means that if the player is pressing on the first third of the screen, the left part, the Player will move left. )
// Move Right //
If cursor X position is > SceneWindowWidth() - (SceneWindowWidth()/3)
simulate pressing Right key for Player
flip horizontally Player: no
( This means that if the player is pressing on the right side of the screen, greater than 2/3 of the screen, the player will move left. )
// Press Center - Jump //
If cursor X position is > SceneWindowWidth() / 3
If cursor X position is < SceneWindowWidth() - (SceneWindowWidth()/3)
simulate pressing Jump key for Player
( This means that if the player is pressing on an area that's more than 1/3 of the screen and not more than 2/3 of the screen - the middle of the screen - the player will jump. )
All the conditions in the sub-events need to be in the layer “Touch”, or whatever new layer you made for it - or else this will not work.
Please, also remember to make these 3 events be Sub-Events of the “If touch or Left mouse button is pressed” event, otherwise it won’t work either!
The conditions to check where the cursor/touch is can be found in “Mouse and Touch > Cursor X Position”.
The action to simulate the pressing of the keys can be found in “Platform Behavior > Controls”. Please, make sure to use the Platform behavior-specific actions - not the Top-Down ones!
I hope this helps! ^^