Download

Using a Timer to sample a variable.

I’ve never used Timers but it’s seems that they’ll be useful in what I’m trying to achieve. I want to check whether or not my character has been holding down A or D on the keyboard (turning) for x seconds, so that I can apply a slide effect. How about should I go about this? Do I call the “Set Timer by Event” on my “BeginPlay” event, make it looping and then compare after a delay when A or D is pressed? I’m not sure about the optimum way of setting it up. The end result I’m looking for should be, “Has the player been turning continuously for 1.5 seconds? If so, apply slide effect. If not, continue listening in case they do.” Any ideas?