FakeScriptEvent

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

"Fakes" the specified script-event on the calling reference, forcing the matching Event Block in its script (if one exists) to run.

Syntax

[help]
(success:0/1) reference.FakeScriptEvent eventName:string filterForm:ref

Example

actorRef.FakeScriptEvent "OnActorEquip" SomeWeaponForm
doorRef.FakeScriptEvent "OnOpen"
inventoryRef.FakeScriptEvent "OnUnequip" player
objectRef.FakeScriptEvent "OnLoad" 

Notes

  • This function is not affected by SetScriptEventDisabled, and will work even if the specified Event Block is disabled.
  • Does not trigger NVSE event-handlers.
  • Cannot be used to fake OnActivate event. Use the vanilla Activate.
  • This cannot be used to run a code block on a quest script.

See Also