Skip to content


This event is invoked whenever something is activated, typically by the player. Activation is usually done with the associated activate/use key, but may also be forced by scripts.

Non-player actors may also activate objects, such as when opening doors, or via MWSE functions like tes3.activate().

Some examples of when the activate event fires includes:

  • When a door is used.
  • When an item is picked up.
  • When someone attempts to open a container.
--- @param e activateEventData
local function activateCallback(e)
event.register(tes3.event.activate, activateCallback)


This event can be filtered based on the target event data.


This event supports blocking by setting e.block to true or returning false. Blocking the event prevents vanilla behavior from happening. For example, blocking an equip event prevents the item from being equipped.


An event can be claimed by setting e.claim to true, or by returning false from the callback. Claiming the event prevents any lower priority callbacks from being called.

Event Data⚓︎

  • activator (tes3reference): Read-only. The actor attempting to trigger the event.
  • target (tes3reference): Read-only. The reference that is being activated.


Example: Prevent the player from activating NPCs

local function myOnActivateCallback(e)
    -- We only care if the PC is activating something.
    if (e.activator ~= tes3.player) then

    -- If the player targets an NPC, block the activation.
    if ( == tes3.objectType.npc) then
        return false
event.register(tes3.event.activate, myOnActivateCallback)

Example: Show a message for what the player is activating

-- Show the id when the player activates an object.
local function myOnActivateCallback(e)
    if (e.activator == tes3.player) then
        tes3.messageBox({ message = "Activated " .. })
event.register(tes3.event.activate, myOnActivateCallback)

Last update: August 25, 2023 10:03:48
Created: August 10, 2021 18:38:47