Download

Delay?

Hi! I have been trying to set up delay for my system, but it seems really hard to get any info on that.

Basically, what i am trying to do is to play “jump” animation for 0,2 seconds when spacebar is hit. (due to the nature and style of the animation, I really want it play 0,2s, instead of just playing it once).
Here is what I have now:

void ACharacter::TouchStopped(const ETouchIndex::Type FingerIndex, const FVector Location)
{
StopJumping();
//wait 0.2s
Sprite->SetFlipbook(IdleAnimation);
}
as you can see, I have commented “//wait 0.2s”. Obviously that has to be replaced with a real command that does so, but what is it?
Thanks!

You might want to look at the TimerManager: https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/FTimerManager/index.html