Name:
objAddItem
Syntax:
(objAddItem spaceObject itemStruct [number])
Argument List:
spaceObject: The space object that you want to add the item to.
itemStruct: The itemStruct of the item you want.
number: A number if there over rides the number of the item in the itemStruct.
Returns:
True.
Category:
item, spaceObject
Description:
Adds the item to the space object. If number is there uses that many items otherwise uses the number of items in the itemStruct.
Example:
Code: Select all
(objAddItem gplayerShip (itmCreate 0x4001 2))
Adds two segments of light titanium armor to the player ship.
Code: Select all
(objAddItem gplayerShip (itmCreate 0x4001 3) 3)
Adds three segments of light titanium armor to the player ship.
Code: Select all
(objAddItem gplayerShip (itmCreate 0x4001 2) 5)
Adds five segments of light titanium armor to the player ship.
Comment:
Very helpful function for adding non random items to a space object from code.