Functions Documentation
View Function Edit Function
Name objSetItemData
Syntax (objSetItemData obj item attrib data [count]) -> itemStruct
Argument List obj: the spaceobject that has the item
item: the item that the data is to go to
attrib: the attribute of the data
data: the actual data
[count]: the amount of items in the stack to set data on. Defaults to all
Returns ItemStruct: the new item
Category item, spaceobject
Description Used to store data on items.
Example Taken from stkFreshFoodUpdate
; If the food has turned ripe, mark it
(and (not status) (gr (add (unvGetTick) 1800) expireTime))
(block Nil
(objSetItemData theSource theItem "status" 'ripe (itmGetCount theItem))
(if (eq theSource gPlayerShip)
(plyMessage gPlayer "The " 
(itmGetName theItem 0x80) " in your cargo hold look ripe")
)
)
Comment