Press key for ten times and play animation on artificial intelligence

Hello to all I need help with blueprint of an AICharacter that when approaching Mycharacter press ten times a key and play an animation or if you press more than ten times to play another animation

thank you very much

Hi there, I think there is a very simple fix to your problem, all you need to do is to create an integer variable, when you press a button, you need to “get” the current variable value and then +1 to that, then use the compareInt function to see if the value is above, below or equal to 10 and set the annimations accordingly. Hope this helps!

135472-press10+times.png