Hey, I just wonder if there is a way to pause a for-loop between every item.
My current approach is:
Lua Code:
local function sleep(s)
local futureTime = GetGameTimeSeconds() + s
while GetGameTimeSeconds() < futureTime do end
end
local function testSounds()
local duration = 5
local count = 1;
for key, value in pairs(UAN.Sounds) do
PlaySound(value)
Util.p("[%d]: %s", count, key)
count = count + 1
sleep(duration)
end
end
But the for-loop is so fast, that it stacks all sleep-calls and causes to freeze the game. x)