Hold Button Input! Holding button for extra events!

Sdílet
Vložit
  • čas přidán 11. 09. 2024
  • Hello devs! In this video I covered how to make, or rather change events depending on the type of input; specifically tapping and holding. I hope you will find this video helpful!
    My goal: 150 subscribers.
    Subscribe if you like my tutorial series. I'm posting daily and I need your support!

Komentáře • 37

  • @gertsuik6092
    @gertsuik6092 Před 5 měsíci

    Very straightforward and efficient way of doing it. Thanks.

  • @SkywalkerX84
    @SkywalkerX84 Před 3 lety +3

    One like is not enough, clear and straight to the point, thanks a lot, that really helped.

  • @megtwin
    @megtwin Před 3 lety +4

    Really good explanation, only thing to find fault with is that I had to have all volumes on full to hear you. Thanks!

  • @tientam779
    @tientam779 Před 4 lety +2

    Nice tutorial, also really cool how you sighted where you found this! Love to see more tutorials from you in the future!

  • @ExistentialPineapple
    @ExistentialPineapple Před rokem

    Wonderful little macro you made there! Thank you very much for such a straightforward and concise tutorial, its hugely appreciated!! :D

  • @RealDaveTheFreak
    @RealDaveTheFreak Před 2 lety +1

    YOU'RE A FREAKIN' LIFE-SAVER! xDDDD

  • @pibetry
    @pibetry Před 2 lety +2

    Great tutorial! however, VOLUME LOUDER PLS!

  • @MadCoonGames
    @MadCoonGames Před 3 lety +2

    Great tutorial, smart coding!

    • @haftindie
      @haftindie  Před 3 lety +1

      Thank you!

    • @MadCoonGames
      @MadCoonGames Před 3 lety +2

      @@haftindie I added another pin to the release sequence, and plugged it straight into the output of the Macro to have a third pin option named release, this helped me with my click or draw marquee system! Thanks and have a good one! Maybe this info is of use to you mate

  • @balajihacker9327
    @balajihacker9327 Před 4 lety +1

    Thx for video !!

  • @endlessnoodle3056
    @endlessnoodle3056 Před 3 lety +1

    Fantastic video, but by gods, it's way too quiet

  • @jakelewis3782
    @jakelewis3782 Před rokem

    How do you get a button to reset after releasing it? For example, if I press space bar, I'll jump. If I hold space bar for 1 second, I will fly. How do I make the character release fly and come back to the ground when I release the space bar? Thanks!

  • @cuki3277
    @cuki3277 Před 3 lety +1

    hey very nice tutorial, thanks!! Do you have any idea of how to do a release button as well???

    • @cuki3277
      @cuki3277 Před 3 lety +1

      Never mind, I already did it my self thank you again this is really usefull

    • @camelotvfx
      @camelotvfx Před 2 lety

      @@cuki3277 I just noticed your comment and am wondering how you did the release after the hold? any help would be appreciated!

    • @cuki3277
      @cuki3277 Před 2 lety

      give me your discord id and ill send you a picture of the code

  • @MZONE3D
    @MZONE3D Před 3 lety +1

    great thanks :) be cool to add a double tap to this is? Do you have any idea how to do a double tap?

    • @haftindie
      @haftindie  Před 3 lety

      czcams.com/video/CQKlZjcXyg8/video.html&ab_channel=Mono-UE4
      Hi, this video shows how to understand if the player is tapping multiple times or not. You can use this to create a double tap function.

  • @KelSchirmer
    @KelSchirmer Před 4 lety +1

    great video, i have a question: is there anyway i can perform tap tap then hold to perform an action?

    • @haftindie
      @haftindie  Před 4 lety

      I've never done it however you can set a gate that closes after a split second which checks if you double tapped.
      If you did actually double tap, the gate will check if you're holding the button down.

  • @nfstrmaster
    @nfstrmaster Před 3 lety

    Would there be a way to implement a third state (tapped, held, held long)? I've tried for the past hour to get something to work but couldn't, maybe I'm not understanding gates correctly.

  • @michelsantos4236
    @michelsantos4236 Před 3 lety

    How to make this for left mouse click? I need very this for my game in construction! Very thanks friend

  • @rainbowtechmedia1997
    @rainbowtechmedia1997 Před 3 lety +1

    Hey, good work.. Can you help with this?.
    How do I make left and right button in a mobile game.. I already got it right to the widget, I don't really understand how to make the button event which will make player go left and right..

    • @haftindie
      @haftindie  Před 3 lety +1

      Hi, you can create a widget which will contain 2 buttons. Inside the widget blueprint you can assign functions or events to these buttons.
      For example when the left button is pressed, from a reference to the player character you can call AddMovementInput.

    • @rainbowtechmedia1997
      @rainbowtechmedia1997 Před 3 lety

      @@haftindie yeah. I did.. And it's moving left and right, but not continously moving. The button is acting like a tap.. Even if I pressed it down, it doesn't go forward continously even if I hold the buttons . It will just take a step forward and stop and it's even slow., I still must press the button again and again to take about two steps forward.
      I want something that will work like the screen joystick movement system.
      . Continously moving forward and backward whenever I press and hold the buttons.

    • @haftindie
      @haftindie  Před 3 lety +1

      @@rainbowtechmedia1997 That is because buttons do not continuously supply "flow". They only execute once and that's it.
      You can instead check to see if the button is being pressed on tick, and each tick if the button is being pressed move the player.
      Using the tick like this is acceptable since a usual input would act the same way anyways.
      Here's a simple to do list:
      - Set a boolean true/false when button is pressed/released.
      - On tick, check if boolean is true, if so: move the player to the direction that boolean is associated with.
      - If player releases the button, set the boolean back to false so the player can stop.

  • @VVLGANESHK
    @VVLGANESHK Před 3 lety

    But how can I am not getting for touch interface buttons. How? Any help ?

  • @yaboii2304
    @yaboii2304 Před 4 lety +1

    1:45 how did you change the input

    • @haftindie
      @haftindie  Před 4 lety

      Oh, sorry about that. My monitor is 21:1 and I forget to change the ratio sometimes.
      The input is changed from the panel on the right of the screen. You can get to this panel by clicking on the input node.
      Thank you!

    • @yaboii2304
      @yaboii2304 Před 4 lety +1

      Mono-UE4 oh ok thanks

    • @haftindie
      @haftindie  Před 4 lety

      @@yaboii2304 No problem.

  • @vladaslav
    @vladaslav Před 3 lety +1

    How can you make this work on a widget button?

    • @haftindie
      @haftindie  Před 3 lety

      It should work. You should be able to access the pressed and released events for the widget button.

  • @itsfuyzz8951
    @itsfuyzz8951 Před 4 lety +1

    hello
    why i cant see the "Hold" Input in my ue4 ?

    • @haftindie
      @haftindie  Před 3 lety

      You need to create it yourself. There is no default hold input.

  • @screwdajuice
    @screwdajuice Před 2 lety

    Man, your video is way too quiet.