SetScriptEventDisabled

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Disables/re-enables the specified script-Event Block (i.e. OnActivate, OnAdd, OnTrigger, etc.) in the Script (if any) of the specified form(s).

  • A disabled Event Block will not run when its matching game-event occurs and gets registered in the containing Script.

There are three options for the first argument (anyFormOrList):

  • An Object Reference - In which case, the effects will apply only on that one, specific reference.
  • A Base Form - In which case, the effects will apply on every instance of that form in the world.
  • A Form List of object references and/or base forms.

The second argument (eventNames) is a string containing the event names. Multiple event names may be specified, separated by a space.

Syntax

[help]
SetScriptEventDisabled anyFormOrList:ref eventNames:string disable:0/1

Example

SetScriptEventDisabled RoseOfSharonCassidyRef "OnHit OnStartCombat" 1
SetScriptEventDisabled TrapTripwire01 "OnActivate OnTriggerEnter OnLoad" 1
SetScriptEventDisabled WeapNV9mmPistol "OnEquip OnAdd" 0
SetScriptEventDisabled EventDisabledList "OnOpen OnReset" 1 

Notes

  • This function has no effect on, and does not interfere with NVSE's event-handling system, which will function normally.

See Also