SetTimerInterval Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

NOTE! Timers are responsible for performing specific code, after specified time.

Change current interval of the timer. Interval is time to wait, until next timer call.

Syntax

int setTimerInterval(int id, int interval)

Required Arguments

  • id: The id of the timer
  • interval: New interval as milliseconds.

Example

local counter = 0;

local id = setTimer(function()
{
	print(counter++);
	setTimerInterval(id, counter * 1000); // after every calling, timer interval will be increased by 1 second
}, 1000, 0);

Related functions