UKismetSystemLibrary::K2_SetTimer
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
This is the Blueprint 'Set Timer by Function Name' node — the standard way to schedule a delayed or repeating call to a named function on an object. Returns a handle that can be stored and used to clear, pause, or query the timer later.
Caveats & Gotchas
- • FunctionName is a plain string matched by reflection at runtime — renaming the target function does not produce a compile error, only a silent failure (or a runtime warning) the first time the timer tries to fire.
- • In C++, prefer FTimerManager::SetTimer with a real delegate instead; this reflection-based lookup exists specifically to support the Blueprint node and is slower than a direct delegate call.
- • Calling this again with the same Object and FunctionName resets and replaces the existing timer's parameters rather than creating a second concurrent timer.
Signature
static FTimerHandle K2_SetTimer(UObject* Object, FString FunctionName, float Time, bool bLooping, bool bMaxOncePerFrame = false, float InitialStartDelay = 0.f, float InitialStartDelayVariance = 0.f); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Object | UObject* | Object that implements the target function. Defaults to self (the blueprint the node is placed in). | — |
| FunctionName | FString | Name of the function to call — either a K2 function or a Custom Event, matched by string against the object's function table. | — |
| Time | float | Seconds to wait before executing the function. Setting an existing timer to <= 0 seconds clears it instead. | — |
| bLooping | bool | If true, the function is called repeatedly every Time seconds instead of just once. | — |
| bMaxOncePerFrame | bool | For looping timers, whether to fire only once when the timer would otherwise expire multiple times within a single frame. | false |
| InitialStartDelay | float | Extra one-time delay, in seconds, added before the timer manager starts counting. | 0.f |
| InitialStartDelayVariance | float | Random variance added to InitialStartDelay, in seconds, useful for staggering many timers so they don't all fire in sync. | 0.f |
Return Type
FTimerHandle Example
Repeating damage-over-time tick (Blueprint) Blueprint
Event graph: call 'Set Timer by Function Name' with Object = self, FunctionName = 'ApplyDotTick', Time = 1.0, Looping = true; store the returned Timer Handle in a DotTimerHandle variable so it can be cleared when the effect expires. Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?