How can I do it so when right click is held down the progress bar goes down each second

I have a slow motion bar that when I press right click it slows the game to 0.5 rather than 1, and when It is pressed it only goes down 1 value.

I want it to go down 1 value per second while the player is holding down the mouse. So if the player held the button down for 5 seconds Its value would go down 5 as well. Does anyone know how to do this or could give any help :slight_smile:

Thank you

Hello, I know this is kinda random but I have a problem with default walk animation can you take a look at it? I noticed that you help a lot and no one else helped me so I am asking you :confused: https://answers.unrealengine.com/questions/993577/view.html Thanks :slight_smile:

From the top:

  • create the widget with a progress bar
  • have a timer execute its event at dilation interval, starting early for that instant gratification feel
  • releasing RMB or running out of time restores dilation and stops the timer

To do:

  • fast clicking depletes time remaining rapidly - introduce a repeater clamp to the clicks

@Panteplak: I know less about animation than you.

Don’t know about that :smiley: But that’s ok I understand. Thanks anyway :slight_smile:

Hello, here is an alternative to everyones approach. I think this will be easier to follow if you are a beginner. So basically in picture: UE4 answerhub 1 you just copy what’s in the picture. (JUST CHANGE VALUES: SET GLOBAL TIME TO 0.5 AND IN SET TIMER BY FUNTCION NAME - TIME TO 0.5) I highlighted some important thing so make sure you copy that as well.
Then you gonna create a function. Just click + button under function.
And then just copy other picture inside that function.

Obviously you gonna have to create regenerate stamina system and some progress bar if you want to have it in the player’s widget. This is just a basic system.

Thank you so much, This worked straight away. I know how to use ue4 a little bit but I could not figure this out at all. Thank you for the help :slight_smile: