Mod:Creation Kit/AddInventoryEventFilter - ScriptObject

Member of: ScriptObject

Adds a form as a "filter" for OnItemAdded and OnItemRemoved events sent to this object. The filter is applied separately to each script on an object, so each script on an object needs to separately manage its own filters and will not interfere with any filters on any other scripts attached to the same object.

Syntax
Function AddInventoryEventFilter(Form akFilter) native

Parameters

 * akFilter: The item to filter with.
 * If none, all items will be allowed through - but you MUST be able to handle several hundred at once!
 * If a base object, this object will only be notified of base objects matching exactly.
 * If a keyword, it will check the object for said keyword
 * If a component, it will check the object for said component
 * If a form list, it will filter using all of the forms in the form list (only items in the form list will be allowed through).

Return Value
None.

Examples
AddInventoryEventFilter(Gold) AddInventoryEventFilter(SoulGemList)
 * Make sure we only get events for gold and soul gems