Difference between revisions of "OnItemAdded - ObjectReference"
Added note about using this event to force-equip items in a pick-pocketting or OpenInventory() dialogue.
imported>Sollar |
imported>Layam (Added note about using this event to force-equip items in a pick-pocketting or OpenInventory() dialogue.) |
||
Line 33: | Line 33: | ||
*Once an object has been added to a container it is no longer valid to call member functions on it. Member functions on akItemReference (which is often None) will most likely fail to run with an error. | *Once an object has been added to a container it is no longer valid to call member functions on it. Member functions on akItemReference (which is often None) will most likely fail to run with an error. | ||
*If you only care about certain kinds of objects, you should also use [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]] to filter out any events for things you aren't interested in. | *If you only care about certain kinds of objects, you should also use [[AddInventoryEventFilter - ObjectReference|AddInventoryEventFilter]] to filter out any events for things you aren't interested in. | ||
*Although you can use this event to force actors to equip items in an [[OpenInventory - Actor|OpenInventory]] or pick-pocketing dialogues, those items will not be visible until the dialogue is ended. Calling the SKSE function [[QueueNiNodeUpdate - Actor|QueueNiNodeUpdate]] straight after calling EquipItem can force the actor to draw the new equipment immediately. | |||
== See Also == | == See Also == |