Skip to content

scriptExecute⚓︎

This event is fired when a Morrowind script begins executing. It is blockable, so handlers can prevent the engine script call from running.

--- @param e scriptExecuteEventData
local function scriptExecuteCallback(e)
end
event.register(tes3.event.scriptExecute, scriptExecuteCallback)

Tip

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

Tip

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.

Tip

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⚓︎

  • info (tes3dialogueInfo, nil): Read-only. The dialogue info associated with this script execution, if any.
  • reference (tes3reference, nil): Read-only. The primary reference passed to the script, if any.
  • reference2 (tes3reference, nil): Read-only. The secondary reference passed to the script, if any.
  • script (tes3script): Read-only. The script about to execute.
  • variables (table): Read-only. A snapshot of the script variables that the execution will use.

scriptExecuted