the events in openmw-lua works/starts by simply defining it with these


Defining local event works in the sender like:

target:sendEvent( "eventname" , { data = value(s), another_data = value(s) } )

GLOBAL events are the same but don't need target, just the core, ie.

local core = require('openmw.core')
core.sendGlobalEvent( "eventname", { data = value(s) } )

For sending events to local script (attached somewhere):