timer.after

Schedules a one-shot callback.

Syntax

ue.timer.after(delay_seconds: number, callback: function) -> integer

Parameters

ParameterTypeDescription
delay_secondsnumberDelay before firing; negative values become zero.
callbackfunction(id)Function called with the timer ID.

Returns

TypeDescription
integerTimer registration ID.

Example

local id = ue.timer.after(0.5, function(timer_id)
    print("fired", timer_id)
end

On this page