Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timer() function/event (node timer based) to luacontroller
This adds a timer(<seconds>) function, which causes an event of type "timer" to be fired after that many seconds has elapsed. Because it's node timer based, it works properly across server restarts and block unloading. Thus, simplest example, a blinky plant replacement with a 10 second period: if event.type == "program" then timer(10) elseif event.type == "timer" then port.a = not port.a timer(10) end
- Loading branch information