Owl.Util.Scheduler:Until(fn: (dt: number) -> boolean, opts?: TaskOptions): TaskHandle
Server & ClientExecutes a callback every frame until it evaluates to true, which automatically unqueues and stops the task.
Parameters
fn*(dt: number) -> boolean | Predicate function. Return true to stop execution. |
opts | Optional task options. |
Returns
TaskHandleHandle object for the task.
Related Types
Owl.Util.Scheduler:Until(function(dt)
if characterIsDead() then
return true -- > // Cancels automatically
end
updateHealthBar(dt)
return false
end)