Sleep Lua script without halting entire program?
snippet in lua

Sleep Lua script without halting entire program?

user9936

c_obj:wait_for_message("mouse_down");
local message = coroutine.yield();
if(message == "mouse_down") then
  update draw function.
end
c_obj:wait_for_message("mouse_up");
local message = coroutine.yield();
if(message == "mouse_up") then
  Update UI..
  update draw function.
end 
etc...