START HERE

under sections

examples

modding openmw points

This documentation is meant code snippets and tutorial like regarding openmw lua coding. At the time of this writing the most recent version of openmw is 0.50.

Events

Event infrastructure

--''as basic examples''
--sending event to object script or inbuilt event:
object:sendEvent("unique event name", { event data = sent data })

--sending rogue global event for global script to catch
core.sendGlobalEvent("unique event name", { event data = sent data })

Interfaces

interfaces

engine handlers

Engine handler examples

local function onUpdate(dt)
		-- do stuff
end

return { engineHandlers = { onUpdate = onUpdate }}

or inside the return which can affect readability

return { engineHandlers = { onUpdate = function(dt) 
		-- do stuff 
end }}

Async callbacks