Skip to content

mv.process.define

Define a process through the namespace. The same function as the callable process.

Parameters

  • fn — The process body.
  • options? — A table with defaults and children_attached.
local Walk = mv.process.define(function(self)
self.x = self.x + 1
frame()
end)

Related: process, spawn.

See the lua processes guide for more examples and limits.