Is it possible to make a wait in Luna.Lua?
Posted: Tue Feb 07, 2017 2:54 pm
There used to be a wait function in Lua, but I cant seen to find it, is it just regular wait(3)? Or.... 

Forums for SMBX
https://www.smbxgame.com/forums/
You're probably thinking of Teascript-vb used by 38A. That is NOT Lua and has no relevance at all.BananaCat wrote:There used to be a wait function in Lua, but I cant seen to find it, is it just regular wait(3)? Or....
Code: Select all
local timerStart;
function onStart()
timerStart = lunatime.tick(); --start the timer
end
function onTick()
if(timerStart ~= nil and lunatime.tick() > timerStart+lunatime.toTicks(3)) then
--timer is finished
timerStart = nil;
end
end