Difference between revisions of "SellItem - ObjectReference"

67 bytes removed ,  18:33, 15 April 2017
Changed the item parameter note to be more clear about its mention of properties.
imported>Plplecuyer
 
imported>Qazaaq
(Changed the item parameter note to be more clear about its mention of properties.)
 
Line 3: Line 3:
'''Member of:''' [[ObjectReference Script]]
'''Member of:''' [[ObjectReference Script]]


"Sells" X of the specified item from this reference's inventory..
"Sells" X amount of the specified item from this reference's inventory.


== Syntax ==
== Syntax ==
Line 34: Line 34:


==Notes==
==Notes==
*'''THIS FUNCTION DOES NOT TRIGGER THE OnSell() EVENT!'''
*The generic ''Item'' parameter accepts a form object, however you must provide a higher type of object that extends form. Most often a [[MiscItem]], or [[Weapon]], etc.
*The function accepts a form object, however you can't make a property to a form object, you need to create a property to another type of object that extends form. Most often a MiscObject, or Weapon, etc.
*This function does not trigger [[OnSell - ObjectReference|OnSell()]] event.
*'''Untested/verified:''' If you pass in a form list, it will remove AmountToSell of each item in the form list from the container. If there isn't AmountToSell of a particular item in the container, it will remove all of them.
*'''Untested/verified:''' If you pass in a form list, it will remove AmountToSell of each item in the form list from the container. If there isn't AmountToSell of a particular item in the container, it will remove all of them.


Line 43: Line 43:
*[[GetItemCount - ObjectReference]]
*[[GetItemCount - ObjectReference]]
*[[RemoveAllItems - ObjectReference]]
*[[RemoveAllItems - ObjectReference]]
*[[OnSell - ObjectReference]] -- NOTE: SellItem() DOES *NOT* TRIGGER THE OnSell EVENT!
*[[OnSell - ObjectReference]]
Anonymous user