Difference between revisions of "SKSE Wish List"

358 bytes added ,  02:28, 22 July 2015
→‎ObjectReference: OnItemDropped
imported>DavidJCobb
(→‎ObjectReference: IsInContainer)
imported>DavidJCobb
(→‎ObjectReference: OnItemDropped)
Line 67: Line 67:
*'''GetStackedItemCount''' - If the ObjectReference is a single dropped item, returns 1. If the ObjectReference is several of an item "clumped"/"stacked" into one world object, returns the number of items. If the ObjectReference isn't an item, returns 0.
*'''GetStackedItemCount''' - If the ObjectReference is a single dropped item, returns 1. If the ObjectReference is several of an item "clumped"/"stacked" into one world object, returns the number of items. If the ObjectReference isn't an item, returns 0.
*'''IsInContainer''' - Returns true if the ObjectReference is inside of a container (i.e. it isn't safe to work with or access data on).
*'''IsInContainer''' - Returns true if the ObjectReference is inside of a container (i.e. it isn't safe to work with or access data on).
** Papyrus is able to tell if an object is in a container, because casting the object to a string (as in a Debug.Trace call) yields something like "[MyScriptName <Item 358 in container  (00000014)>]". However, there don't appear to be any native methods to access this data, and searching a string for that information seems like the kind of solution that will blow up in a scripter's face in edge-cases.
** Papyrus is able to tell if an object is in a container, because casting the object to a string (as in a Debug.Trace call) yields something like "[MyScriptName <Item 358 in container  (00000014)>]" or "[MyscriptName <None>]". However, there don't appear to be any native methods to access this data, and searching a string for that information seems like the kind of solution that will blow up in a scripter's face in edge-cases.
*'''OnItemDropped''' - Fires when the item is dropped from a player's inventory, but not when it is removed from the inventory through some other means.
** If you only need to detect dropping and not container transfers, then this would be safer than OnContainerChanged, which can cause stack dumping when applied to many objects.


====Perk====
====Perk====
Anonymous user