nope, you can just create some kind of state machine in lua:

Code:
function loop2(sm)
  -- Idle here
end

function loop1(sm)
  sm.myTicks = sm.myTicks - 1
  if sm.myTicks < 0 then
    sm.update = loop2
  end
end

function init(sm)
  sm.myName = "Hello World"
  sm.myTicks = 16
  sm.update = loop1
end

sm = { }
sm.update = init



From Lite-C you call sm.update with sm as the argument. so you have an object that gets a flexible update every frame.
the system terminates if sm.update = nil

Last edited by MasterQ32; 11/29/13 11:18.

Visit my site: www.masterq32.de