
Any help/suggestions greatly appreciated!


Keep in mind a timer on different floor works slower, I know Komag has a work around but I couldn't find it to link.Different races consume water at different rates and it works on a 'dt' system - so even though the timer is on floor 1, it'll always consume dt*waterConsumedPerSecond every time the timer ticks (be it once a frame, or once a second).
Code: Select all
local lastTickTime = getStat("play_time");
local somethingsPerSecond = 10;
function onTick()
local tickTime = getStat("play_time");
local dt = tickTime - lastTickTime;
lastTickTime = tickTime;
local numberOfSomethingsSinceLastTick = dt * somethingsPerSecond;
end