Skip to content
Jérôme Leclercq edited this page Dec 8, 2020 · 1 revision

API: timer.Create

Description:

Sets a timer which executes a function once the timer expires.

Prototype:

timer.Create(time: integer, callback: function)

Parameters:

  1. time: Time in milliseconds before triggering callback.
  2. callback: Callback to be called

Remarks:

  1. The callback function will be triggered in the main Lua thread and not in a coroutine.
  2. The time resolution depends on the match tickrate, as the callback will only get called in the tick following the timer expiration.
Clone this wiki locally