Difference between revisions of "GetInventoryObject"

439 bytes added ,  18:49, 10 September 2007
→‎Notes: Performance
imported>WereWolf
(Fixed categories)
imported>Haama
(→‎Notes: Performance)
Line 20: Line 20:
*Like [[GetNumItems]], this works with ''unique items'' - if your 4th item was an arrow, and you have ten of them, GetInventoryItemType 3 (it starts with 0, 3 is the fourth value) will return Iron Arrow, and GetInventoryItemType 4 will return whatever is next, ''not'' another Iron Arrow.
*Like [[GetNumItems]], this works with ''unique items'' - if your 4th item was an arrow, and you have ten of them, GetInventoryItemType 3 (it starts with 0, 3 is the fourth value) will return Iron Arrow, and GetInventoryItemType 4 will return whatever is next, ''not'' another Iron Arrow.
*Prior to OBSE v0006, this function was known as '''GetInventoryItemType'''.
*Prior to OBSE v0006, this function was known as '''GetInventoryItemType'''.
*Using this function every frame will significantly drop FPS (by 3 on my semi-old computer). If you need to run it constantly, try to find an alternative (i.e., linked lists of reference variables to the items and '''if (SomeNPC.GetItemCount pInvObj)'''), or only run it every few frames (5 or more). Note that this only applies to using the function every few frames, a 1000 of them in a single frame will take less than a second to run.


[[Category: Functions (OBSE)]]
[[Category: Functions (OBSE)]]
Anonymous user