Is there a sleep/delay function
Hey folks
I did not find a solution to let my script wait for a specified time period.
The only way I achieved it is pretty bad, because its busy wait.
Code:
function Functions:Sleep(d)
local start = Turbine.Engine.GetGameTime();
while Turbine.Engine.GetGameTime() < start + (d/1000) do
--nothing
end
end
This is not really nice 
Hopefully some more advanced lua scripters out there may have a solution
Wenn mein Beitrag dir helfen konnte, würde ich mich über eine Bewertung sehr freuen. Um dies zu tun, klicke einfach auf reputation unter diesen Text.
When my post was able to help you, I would really appreciate when you rate it. To do so, just click on reputation below this text.