set_timer - ryzom/ryzomcore GitHub Wiki


title: Set Timer description: published: true date: 2023-03-12T21:24:03.916Z tags: editor: markdown dateCreated: 2023-03-12T21:24:00.589Z

setTimer

The setTimer native AI script function is used to set a timer with a specified delay time and start it.

Syntax

()setTimer(DeltaTime: f, TimerId: f) 

Arguments

  • DeltaTime (float): The time (in ticks) before the timer event is triggered.
  • TimerId (float): The ID of the timer to set.

Example

setTimer(200, 0); 

In this example, the function setTimer is called to set a timer with an ID of 0 and a delay of 200 ticks, meaning it will trigger the t0 timer event in 20 seconds.

⚠️ **GitHub.com Fallback** ⚠️