not a problem, sorry for the delay in response as well.
you could simply try
Code:
local lastAlpha = 0
--this is just for proper scoping of this variable, so it saves between function calls
...
function foo()--this is the function where the snippet below is contained
if isEnergize == true and lastAlpha+2<GetTime() then
_G["RuneButtonIndividual"..runeIndex]:SetAlpha(RHaic)
lastAlpha = GetTime()
end
end
if isEngerize is true, and the last time we changed the alpha (lastAlpha) is less than 2 seconds ago, then we ignore the function call.
so if we are running through the code
lua Code:
local isEnergize = true
local lastAlpha = 0
GetTime()--outputs 100 in this example, real values will likely be in the 6 digits
if isEnergize is true and lastAlpha (which is 0) + 2 (total of 2) is lessthan 100 then do the if statement
set the alpha and now store lastAlpha as 100
now the event is called 1 second later
if isEnergize is true and lastAlpha(which is 100) + 2 (total of 102) is less than 101 (because it was called one second later, and now GetTime() outputs 101) then do the if statement, however it returns false.
and now your function is no longer called
i would set the 2 alot lower, i just wanted to use whole numbers for ease of explaniation... let me know if this isnt clear, I'm bad at explaining things lol