Action tapping key meter

Hi,
I was looking around the forum and google for this “action tapping” but except of double taps or counters that I was trying to convert for my purposes I ended up emptyhanded.
I’m trying to make a widget bar that you need to fill by tapping a specific key. And sadly I need a lot of help with that one. The hard part is that the bar will have to slowly degrade when no or incorrect tapping will take place. The faster you tap the faster the bar will fill and will stay filled when player is still tapping the key. But will start degrading as soon as the tapping stops.
Can anyone please help me with that? BP would be nice as I’m a novice in UE.

Ok, I think It’s close to what I want to do and thank you very much.
Now the problem is that i’m using randomized key from a string. So I have “is input key down” and from some reason now the bar is filling in at the start of the play as it’s connected to event tick just like “minus float”. I’m guessing it’s incorrect.
So I disconnected the set score from counting the key tapping and placed it with the custom event that is started by the “is input key down”, and the bar is filling at the start of the game again. So I’m doing it wrong… Can’t see where. I’ll put some time to that but maybe you have an idea first.

Make an actor to read the keypress

Put it in your level. Then make the widget, with a progress bar:

Use the level BP to add the widget to the viewport:

339871-bar.gif

The key press is filling the bar, the minus on tick, is emptying it.

I can see now that it’s filling the bar from the minus float attached to event tick. :confused:

Yes, that part I understand. The way you done it works great, but it’s not working with my bp. The bar is filling with negative float… don’t know why.

Ok, so the plus float is attached to sprint action at the end:

Then the minus float to tick:

And percentage bar normal standard in widget:

All done in thirdpersoncharacter, maybe that’s what i’m doing wrong?

Best to show your code…

TP is ok. Try just clamping the tapper to 0 - 1.

You’re subtracting a negative, that’s called, adding… :wink:

339880-screenshot-6.png

Ok, i fixed the progress bar - now it’s filling up when pressing correct key from random string.
But still doesn’t decrease it’s progress… :confused:

Yeah, I just noticed it :slight_smile: Silly me. Thank you for your great help!

Nope, didn’t work. Still as soon as the game starts the bar is filling up percentage given in -float, the +float doesn’t work unless I attach it to normal input (eg input q).
I checked it with - float attached and disconnected to event tick.
So it only fills the bar when tapping Q but doesn’t decrease. When decrease option connected to event tick it’s filling the bar. .

Just in case anybody find this post.
Mentioned solution here is working but there is still an issue of tapping key. With this solution you can just hold the key instead of tapping.