HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Check to see if you have two of the same kind of item?

02-12-2006, 10:11 PM#1
HomerTheDragoon
how would i go about checking how many items of an item type i have? thanks.
02-12-2006, 11:59 PM#2
Naakaloh
If you want to see if a unit has a multiple of an item, set up a function that returns boolean. Run checks for each of the slots to see if the item-type in it is the same as in any other slot and return true if you ever find a match if not at the end return false.

If you want to know how many of a type of item a unit has, count them (with a function of course).