UKismetSystemLibrary::K2_SetTimer

Set a timer to execute delegate.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetSystemLibrary.h

Include

#include "Kismet/KismetSystemLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp

Syntax

static FTimerHandle K2_SetTimer
(
    UObject * Object,
    FString FunctionName,
    float Time,
    bool bLooping,
    float InitialStartDelay,
    float InitialStartDelayVariance
)

Remarks

Set a timer to execute delegate. Setting an existing timer will reset that timer with updated parameters.

Returns

The timer handle to pass to other timer functions to manipulate this timer.

Parameters

Parameter

Description

Object

Object that implements the delegate function. Defaults to self (this blueprint)

FunctionName

Delegate function name. Can be a K2 function or a Custom Event.

Time

How long to wait before executing the delegate, in seconds. Setting a timer to <= 0 seconds will clear it if it is set.

bLooping

true to keep executing the delegate every Time seconds, false to execute delegate only once.

InitialStartDelay

Initial delay passed to the timer manager to allow some variance in when the timer starts, in seconds.

InitialStartDelayVariance

Use this to add some variance to when the timer starts in lieu of doing a random range on the InitialStartDelay input, in seconds.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback