Difference between revisions of "Walking Through Inventory Items"

169 bytes removed ,  04:29, 15 February 2011
no edit summary
imported>TheNiceOne
imported>TheNiceOne
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


There are two ways to walk an inventory:
There are two ways to walk an inventory:
#From the end to the beginning - Easier to use with RemoveItem, but slower
#From the end to the beginning - Easier to use with RemoveItem
#From beginning to end - faster
#From beginning to end


==From the End to the Beginning==
==From the End to the Beginning==
Line 45: Line 45:
*Find out how many the player has
*Find out how many the player has
  set InvObjCount to (pCont.GetItemCount pInvObj)
  set InvObjCount to (pCont.GetItemCount pInvObj)
<li>If you are using more than 1 Label/Goto in your script you may need to use an ID for them. See [[Label]] or [[GoTo]] for more information.</li>
</ul>
</ul>


==See Also==
==See Also==
*[[GetInventoryObject]]
*[[GetInventoryObject]]
*[[Label]]
*[[GetNumItems]]
*[[GetNumItems]]
*[[While]]


[[Category:Useful Code]]
[[Category:Useful Code]]
[[Category:Standardized Snippets]]
[[Category:Standardized Snippets]]
Anonymous user