Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
26 results for Timer
Pattern: BeginPlay → K2_SetTimer(Self, 'MyFunction', 2.0, true) → store TimerHandle. Stop: ClearAndInvalidateTimerByHandle(TimerHandle). Prefer SetTimerByEvent over FunctionName for type safety. Delay node is simpler for one-shot but only works in Event Graph.
Pattern: EventBeginPlay → SetTimerByFunctionName(Object=self, FunctionName='OnTimerFired', Time=1.0, bLooping=true). Create a separate custom event/function named 'OnTimerFired' — this is what the timer will call. SetTimerByFunctionName inputs: 'Object' (Object, use 'self'), 'FunctionName' (string), 'Time' (float, interval in seconds), 'bLooping' (bool). Output: 'ReturnValue' (TimerHandle).
Pattern: Variables RegenRate(float)=5.0, RegenDelay(float)=3.0, RegenTimerHandle. On damage received: ClearTimer(RegenTimerHandle) → SET timer(RegenDelay, RegenTick, looping=true). RegenTick function: Branch(Health < MaxHealth) → True: SET Health = FClamp(Health + RegenRate*DeltaSeconds, 0, MaxHealth). False: ClearTimer.
Schedules a function to run after a delay or on a repeating interval. Cleaner than Delay for repeating work.
SetTimerByFunctionNameUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoK2_SetTimer. Prefer SetTimerByEvent for type safety.
Set Timer by Function NameUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoK2_SetTimerDelegate. Safer than FunctionName version. Create delegate from custom event.
Set Timer by EventUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoInternal name is K2_SetTimer not SetTimerByFunctionName.
Set Timer by Function NameUE 5.4, 5.7updated 2mo agoK2_ClearAndInvalidateTimerHandle.
Clear and Invalidate Timer by HandleUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: Variables: TimeRemaining (float), TimerHandle (TimerHandle). Start: EventBeginPlay → SetTimerByFunctionName(Object=self, FunctionName='OnTick', Time=1.0, bLooping=true). OnTick custom function: Subtract_FloatFloat(A=TimeRemaining, B=1.0) → SetVariable(TimeRemaining) → Branch(TimeRemaining <= 0) → True: ClearAndInvalidateTimerByHandle(Handle=TimerHandle) → OnTimerExpired. UI: GetHUD → CastTo<WBP_HUD> → SetTimerText(Conv_FloatToString(TimeRemaining)). Key: SetTimerByFunctionName output 'ReturnValue' is TimerHandle — save it to clear later.