View Single Post
Old 05-25-2019, 10:10 AM   #490
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,280
Default

GUI.freq is in seconds, so you can give it 0.2 or something. For an exact number of loops you would have to manage a counter yourself:
Code:
local updateCounter = 0
local updateFrequency = 100
GUI.func = function()
  if (updateCounter == 0) then
    updateTheThings()
  end

  -- Increments the counter, but wraps it to 0 when it hits 100
  updateCounter = (updateCounter + 1) % updateFrequency
end
GUI.freq = 0
Lokasenna is online now   Reply With Quote