Functions Documentation
View Function Edit Function
Name objHasItem
Syntax (objHasItem source item [count]) -> number of items (or Nil)
Argument List source: The spaceObject you want to test for presence of the item.
item: The itemStruct you want to test if the object has
[count]: an optional minimum amount of items to check for
Returns if the object has any of the items checked for, then it returns the count. If it has none, then it returns Nil. If [count] has been specified and the object does not have that amount, Nil is returned, else the amount is returned.
Category condition query, spaceobject
Description Useful to see if and how many of an item an object has. Note that item must be an itemStruct, that is, it must be created using (itmCreate ...) or gathered in some other manner
Example
(objHasItem gplayership (itmCreate &itHelium3FuelRod; 1) 10)


Checks to see if the player ship has at least 10 Helium Fuel ROds.
Comment