Creating Mobile Controls on Scratch

This tutorial will teach you how to create mobile controls on Scratch.
Subscribe for more awesome tutorials.
Comment what you need help with on Scratch and we will upload a tutorial.

Пікірлер: 77

  • @floppathejetskider
    @floppathejetskider2 ай бұрын

    It works and it’s perfectly smooth, 10/10!

  • @how-to-scratch

    @how-to-scratch

    2 ай бұрын

    Awesome to hear!

  • @AntarcticaMan.
    @AntarcticaMan.3 ай бұрын

    Just put this code: When this Sprite (Arrow Button On Mobile) Clicked Broadcast [ (Left Or Right Message) ] For the Character: If i received Broadcast [ (The lastest Message) ] And put some Motion blocks that countain moves!

  • @MateusLord

    @MateusLord

    Ай бұрын

    E se eu quiser que ele fique em loop, até eu soltar?

  • @NotAlphaSlayer15

    @NotAlphaSlayer15

    10 күн бұрын

    @@MateusLord*use* *if touching mouse pointer and mouse down?*

  • @MateusLord

    @MateusLord

    10 күн бұрын

    @@NotAlphaSlayer15 obrigado

  • @NotAlphaSlayer15
    @NotAlphaSlayer15Ай бұрын

    *use for jump* *If then Key up arrow pressed or mouse down?* *change y by (y speed) or (number)*

  • @Blue_skiesGacha
    @Blue_skiesGacha3 ай бұрын

    This is really smooth! Ty!

  • @how-to-scratch

    @how-to-scratch

    3 ай бұрын

    You’re welcome!

  • @GDude1234
    @GDude123416 күн бұрын

    It work but in the platformer it goes through the platform i just dont understand

  • @andrejbreininger8889
    @andrejbreininger88894 ай бұрын

    How can do that walk and jump both work when I press them both

  • @ronjharedrobles2960
    @ronjharedrobles29603 ай бұрын

    hiim from 2024 of january im 2 day old de, i think u should use ,when this sprite is click, if "not-mousedown" then, brodcast message 1(for arrows),when i receive "message 1", repeat 10 change x by 10

  • @OWG335
    @OWG335 Жыл бұрын

    Love your videos am Wolfgang355 Remember me from scratch

  • @how-to-scratch

    @how-to-scratch

    Жыл бұрын

    Thank you! Yes, of course I remember!

  • @PhiliponBauvart-on8rl
    @PhiliponBauvart-on8rl3 ай бұрын

    Thank you for your video you are the best

  • @how-to-scratch

    @how-to-scratch

    3 ай бұрын

    No problem, and thank you!!

  • @miniongaming81
    @miniongaming8128 күн бұрын

    oh my freaking god it works thank you!!

  • @how-to-scratch

    @how-to-scratch

    23 күн бұрын

    I’m glad it helped!

  • @the_cooking_noob
    @the_cooking_noob2 ай бұрын

    5:09

  • @lizzyr.i.p2203
    @lizzyr.i.p22039 күн бұрын

    Hello how can I make it so that the character can move around a 2d map with the mobile controls (scrolling camera basically). Because I’ve been having trouble to find how to do it. And if there’s anything you don’t understand then let me know :D

  • @how-to-scratch

    @how-to-scratch

    9 күн бұрын

    If it’s for a scrolling platformer, here is a video that would help with that: Creating Your First Scrolling Platformer on Scratch - LEARN HOW! kzread.info/dash/bejne/YmZ5tZmeZ6uunaw.html You could implement the button controls with the video by using broadcasts to tell the level when to move.

  • @lizzyr.i.p2203

    @lizzyr.i.p2203

    8 күн бұрын

    Thank you, but I’ve been trying to do the code and it still doesn’t work. Can you give me the code so I can make it when I click the mobile button the camera scroll moves aswell? And also sorry if I’m bugging you or anything.

  • @Physicsless8
    @Physicsless85 ай бұрын

    how could i insert the when i receive jump into an if key pressed box

  • @how-to-scratch

    @how-to-scratch

    4 ай бұрын

    What if you did, When I receive jump > if key pressed?

  • @thirishwehlaing2274
    @thirishwehlaing22744 ай бұрын

    I'm making a platformer so this help me a lot

  • @how-to-scratch

    @how-to-scratch

    4 ай бұрын

    Glad to hear it helped!

  • @boroughfoxproductions8932
    @boroughfoxproductions8932 Жыл бұрын

    Thx

  • @how-to-scratch

    @how-to-scratch

    Жыл бұрын

    No problem!

  • @Exinciti
    @Exinciti Жыл бұрын

    nice

  • @how-to-scratch

    @how-to-scratch

    Жыл бұрын

    Thank you!

  • @nutobrewe_banana
    @nutobrewe_banana4 ай бұрын

    I managed! but when the sprite left and right buttons are hidden and if I click in the same place where they are, the code will work! what's the matter? how to remove?

  • @how-to-scratch

    @how-to-scratch

    4 ай бұрын

    Huh, weird! That should not be possible. Make sure that they are hidden with the "hide" block, and if that fails, I would try to temporarily relocate the buttons to the edge of the screen until no longer hidden: if hidden: go to: -999,-999 else: go to: (position for when not hidden) And yo u can check for if hidden however you want to.

  • @nutobrewe_banana

    @nutobrewe_banana

    4 ай бұрын

    @@how-to-scratch very thanks!

  • @how-to-scratch

    @how-to-scratch

    4 ай бұрын

    @@nutobrewe_banana Of course!

  • @GroundFIsher
    @GroundFIsher2 ай бұрын

    What if I have animations in a sprite when it walks? It's really glitchy

  • @how-to-scratch

    @how-to-scratch

    2 ай бұрын

    You are absolutely right! Create a separate loop for the animation. You could do: When flag is clicked: Forever: If Touching and Mouse Down?: Switch Costume to Wait 0.15 Switch Costume to

  • @user-li8jg6fs9y
    @user-li8jg6fs9y24 күн бұрын

    Cool

  • @how-to-scratch

    @how-to-scratch

    23 күн бұрын

    Thank you!

  • @differentsmile6398
    @differentsmile63983 ай бұрын

    And not maze wall detection

  • @Villangaming716
    @Villangaming71610 күн бұрын

    Make scratch cat face the direction of the button when pressed like me

  • @how-to-scratch

    @how-to-scratch

    9 күн бұрын

    Ah! To do that, do this: When Green Flag Pressed: Set Rotation Style Then for each button, when pressed on the left button: Point in direction: -90 For right button: Point in direction : 90

  • @Cursenothere
    @Cursenothere4 ай бұрын

    broadcast is a easier way for me but this is better

  • @hoytt8141

    @hoytt8141

    4 ай бұрын

    Thanks bro 😎

  • @asmaabdulhakim
    @asmaabdulhakim3 ай бұрын

    does this help when we use touch screen also?

  • @how-to-scratch

    @how-to-scratch

    3 ай бұрын

    Yes!

  • @Villangaming716
    @Villangaming71610 күн бұрын

    But yeah it’s smooth

  • @LBtorpe
    @LBtorpe4 ай бұрын

    Thankyou

  • @how-to-scratch

    @how-to-scratch

    4 ай бұрын

    You're w elcome!

  • @Exinciti
    @Exinciti Жыл бұрын

    Also could you make a how to add gravity tutorial?

  • @how-to-scratch

    @how-to-scratch

    Жыл бұрын

    Hey! You can find information on gravity here! kzread.info/dash/bejne/fXWEyZiyiLnQpJc.html

  • @Exinciti

    @Exinciti

    Жыл бұрын

    @@how-to-scratch thanks

  • @how-to-scratch

    @how-to-scratch

    Жыл бұрын

    @@Exinciti No problem.

  • @codeacademy6394

    @codeacademy6394

    Жыл бұрын

    when green flag clicked forever change y by (Gravity) change [Gravity] by (-1)

  • @differentsmile6398
    @differentsmile63983 ай бұрын

    I make maze for mobile but i try making like this mobile control but the cat going in maze wall 🧱 so what solution

  • @how-to-scratch

    @how-to-scratch

    3 ай бұрын

    Try following this maze tutorial here: kzread.info/dash/bejne/hoh51aqhkcjQips.html Implement the mobile controls with the collision detection and see if that works!

  • @how-to-scratch

    @how-to-scratch

    3 ай бұрын

    If you get stuck along the way, feel free to share and send the project here, and I can help with the code if you would want!

  • @nathanc6443
    @nathanc6443Ай бұрын

    So how to touch 2 places at once

  • @how-to-scratch

    @how-to-scratch

    Ай бұрын

    Could you give an example of what you mean please? :D

  • @nathanc6443

    @nathanc6443

    Ай бұрын

    @@how-to-scratch i want to go right but jump at the same time but im not sure if that would work

  • @nathanc6443

    @nathanc6443

    Ай бұрын

    @@how-to-scratch like in my platformer i tried adding mobile controls but what happened was it didn’t work as well because you cant jump and go right at the same time

  • @user-qr7zr9gb4k
    @user-qr7zr9gb4k5 ай бұрын

    O have question for you?

  • @how-to-scratch

    @how-to-scratch

    5 ай бұрын

    Let me know your question and I’ll do my best to answer!

  • @sapphireshorts249
    @sapphireshorts2494 ай бұрын

    Open Scratch But On Mobile

  • @MusaAslam-on8ej
    @MusaAslam-on8ej5 ай бұрын

    It didnt work

  • @how-to-scratch

    @how-to-scratch

    5 ай бұрын

    I'd love to take a look at your code and see what the issue might be! Would you be able to send me the link to the project, and then I could possibly help you with it?

  • @LVXD-og7iw

    @LVXD-og7iw

    3 ай бұрын

    ​@@how-to-scratchit didnt work because you only can press ONE button at the same in a phone, because scratch uses "the pointer" to touch a button, and "the pointer" is 1, no 2 or more

  • @LVXD-og7iw

    @LVXD-og7iw

    3 ай бұрын

    ​@@how-to-scratchThis is the reason because is imposible

  • @JustSice

    @JustSice

    Ай бұрын

    @@LVXD-og7iwYou forgot to send the link of the project.

  • @Ligmaballssussybaka

    @Ligmaballssussybaka

    Ай бұрын

    ​@@how-to-scratchthats literally my ideas on mobile

  • @superyousif
    @superyousif9 ай бұрын

    the quality is so bad

  • @how-to-scratch

    @how-to-scratch

    9 ай бұрын

    On the video?

  • @superyousif

    @superyousif

    9 ай бұрын

    yeah

  • @how-to-scratch

    @how-to-scratch

    9 ай бұрын

    @@superyousif That's odd. It shouldn't be bad because the highest quality it goes to is 1080p60FPS.

  • @Sparkstudiosdev

    @Sparkstudiosdev

    6 ай бұрын

    ​@how-to-scratch nahh bro the quality is amazing 👌

  • @Nash188

    @Nash188

    6 ай бұрын

    @@Sparkstudiosdev for real broo

  • @Ligmaballssussybaka
    @LigmaballssussybakaАй бұрын

    Hey thats my idea

Келесі