Announcement

Collapse
No announcement yet.

Input Held Down?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    why there are no hold down button event ?? is it hard to make one ? pls epic team make an event for hold down button .

    i spent all day to find a good method and found this which it worked for me and my IQ i think raised by +1 after losing during research

    here it is ,a R delay hope it will work for you guys :

    Click image for larger version

Name:	hold.jpg
Views:	1
Size:	147.7 KB
ID:	1106497

    ignore the branch of hold jump its part of my project , and the event you want to be trigger put it instead of "start floating event " .
    Last edited by mhnoni; 05-16-2016, 04:53 PM.

    Comment


      #32
      Here's a good way to get the Widget Interaction Component and your 3D Widget working with a MOUSE CLICK.


      Go into your Characters blueprint.

      1. +Add a "Widget Interaction" component from the component window.
      2. +Add a "Widget" component from the component window.
      3. Make sure the Widget Component has your Widget of choice in the 'widget class'.

      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	309.2 KB
ID:	1116285

      These are my settings for the Widget interaction component:
      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	368.2 KB
ID:	1116286


      Go into the graph editor of the blueprint widget you selected before.
      Find your desired button, (or whatever you are using. I've only tested this for buttons), you want to work with the Widget Interaction component.
      Click the ">OnHovered" Event for that button.

      Then do this for that OnHovered event:

      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	102.5 KB
ID:	1116282


      It is worth noting I have another identical button that gets created on top as soon as the button (involved in this tutorial) is clicked. That means if I added this system to that new button it will jump into a fast loop requiring the need for a doOnce node.
      Attached Files
      Last edited by TroJanVirus; 10-06-2016, 05:37 AM.

      Comment


        #33
        Originally posted by mxnko View Post
        You can also use Retriggerable Delay loop back and control when the value is read. See pic:
        [ATTACH=CONFIG]20380[/ATTACH]
        Thanks! It what to need)
        Igor, swamper, sole proprietorship

        Comment


          #34
          Not to bring a dead thread back to life, but I implemented my own system using only the game time, a bool and simple arithmetic if anybody is interested. You just get the game time when the key is pressed, record it, then get the game time when the key is released and record it. Subtract the value from when the key was released by when the key was pressed, and if the difference in time is larger than a predefined value, then it will trigger the held boolean value and switch the branch to the Held function. Click image for larger version

Name:	HeldKeyFunc.png
Views:	417
Size:	88.2 KB
ID:	1623589

          Comment


            #35
            Since the question about other ways, (input actions), being used was never really answered I came up with this method. When the input action is pressed you store whatever button that was into a variable then plug that into the Get Input Key Time Down so it doesn't matter what button your player is using for say Trigger. I put the delay there because it's in tick but you can remove this for exact timing or extend for things you don't need immediate response from. The branches allow for not wasting resources on the math if you're executing the other code and releasing the button flips that boolean so you can repeat the process later.
            Attached Files

            Comment

            Working...
            X