GetEventHandlers

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.2.9.

Description

Returns an array containing all event handlers matching the filter args (or all event handlers, if unfiltered).

Only includes event handlers registered using SetEventHandler / SetEventHandlerAlt, or are generally managed by NVSE.

  • Does NOT include the LN event handlers, such as OnCellEnter, as those handlers aren't managed by NVSE.
  • Events such as SetOnHitEventHandler are not managed by NVSE.

If not filtering by event name, will return a StringMap, where the keys are the event names and the values are arrays of handlers (potentially sorted by priority).
Otherwise, filtering by event name will just return the array of handlers for that event.

An array of handlers sorted by priority is a Map Array, where the keys are priority values and the values are arrays of handlers for that priority.
If a priority filter is used, then this array is skipped, and the array of handlers for the priority is used directly instead.

An array of handlers is a regular array containing an array for each handler.

A handler array contains:

  • Index [0]: Either a script handler, or an array representation of a plugin handler.
    • The latter is a StringMap containing the plugin name at ["Plugin"] and the handler name at ["Handler"]. These strings may be empty.
  • Index [1]: A StringMap of all the filters used by the handler.

Syntax

[help]
(array) GetEventHandlers eventNameFilter:string{""} handlerFilter:UDF{0} priorityFilter:int{0} 

See Also