How do i make a mobile controls

i want to make mobile controls but only if it is in the exported app so when i open my game in the browser there is no mobile controls or from the pc app but if it was from the mobile or anything thats from appstore or andriod the mobile controls will appear.
please use my game as an example
my game: https://flowlab.io/game/play/2112273

you have to have indie to check what device the game is running on. it’s the device check behavior.

i have indie but i need explanation or examples from the my game to help me

1 Like

alright give me a few minutes and i can show u

well you don’t even have mobile controls set up yet…
image
how do i help if there’s nothing to work with

i dont know how to set it up though

well first make your controls in the user interface layer, an example of some simple mobile controls is this, look inside the code of this and put it in your game Flowlab Game Creator - On Screen Buttons

why is it glitching the player when i hold left it or right it goes by it self and it loops the animation

it’s kinda complicated and idk how to explain it but you need to send another message for when you take your finger off the button and then connect it to the stop inputs of the animations and things

can you show example?


and then put the mailbox for “right off” to connect to stop the animation and stop the player running

and you will have to do this for the left arrow as well


remember to do the same for the left arrow

but i put the “right” behavior on the start animation

exactly, so when you are no longer pressing the right button, it stops the animation

im going to make the shoot button

1 Like

how can i make a shoot button

can you just test the game and tell whats the problem and show me examples and tell me how to make a shoot button

there are examples here: Flowlab Game Creator - Flowlab Game Examples and video tutorials here: Flowlab Game Creator - Flowlab video tutorials which can hopefully come in handy. The thing is though, an essential part of gamedev is that you’ll need to solve a lot of problems yourself. Nobody here has everyone code their games - they instead reach out for help when they’re stuck.

You should attempt to come up with an idea as to how you make a shoot button, implement it, test it, adjust, and if you’re still having problems then consult the community.

I’ll start you out with your shoot button: the first thing you wanna do is make a UI layer button like the movement, and send a “shoot” message to the player. Good luck!

1 Like