RemoveEventHandler

Revision as of 21:55, 3 January 2012 by imported>8asrun6aer (Created page with "A command for Oblivion Script Extender '''Syntax:''' (removed:bool) RemoveEventHandler eventID:string functionScript:ref filter1:pair ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A command for Oblivion Script Extender

Syntax:

(removed:bool) RemoveEventHandler eventID:string functionScript:ref filter1:pair filter2:pair

Removes the specified script as an event handler for the specified event. Two optional arguments can be supplied as key::value pairs to filter events according to the target and/or object. If both filters are omitted, all event handlers matching the script and event will be removed. If only one filter is omitted, all handlers matching the script, event, and the other filter will be removed. Returns true if at least one matching event handler was found and removed, false otherwise.

For more details on events and for a list of available events to hook into, see Event_Handler_Functions.

Notes

  • When compiling scripts with this function, CS may generate a "expected string" error for the "filter" arguments. Generally, this error can be ignored if the script still successfully compiles. Be sure to run a live test of any script to ensure it runs in-game successfully.

See Also