Skip to content

StaticActivator

Merlord edited this page Mar 4, 2023 · 3 revisions

You can register a static object as an activator, with custom tooltip and callback.

StaticActivator

StaticActivator.register

Register an object as a static activator. This will give it a tooltip with the provided name, and when you activate the static, the onActivate function will be called. This will also register the object as an Indicator.

CraftingFramework.StaticActivator.register{
    objectId = "my_object_01",
    name = "My Object",
    onActivate = function(reference)
        tes3.messageBox("activated my object!")
    end,
    additionalUI = function(indicator, parentElement)
       parentElement:createLabel{ text = "Text that displays below the header in the tooltip" }
    end
}
Clone this wiki locally