SetTimerExecuteTimes 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 the number of timer execution times. Which exactly mean, how many times timer will be called.

Syntax

int setTimerExecuteTimes(int id, int amount)

Required Arguments

  • id: Timer id
  • amount: New value of execution times.

Example

local id = setTimer(function()
{
	print("I like G2O");
}, 1000, 0); // argument true can be anything

setTimerExecuteTimes(id, 3) // So instead of looping forever, timer will only be executed 3 times and then destroyed

Related functions