Editing SellItem - ObjectReference

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 3: Line 3:
'''Member of:''' [[ObjectReference Script]]
'''Member of:''' [[ObjectReference Script]]


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


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


==Notes==
==Notes==
*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.
*'''THIS FUNCTION DOES NOT TRIGGER THE OnSell() EVENT!'''
*This function does not trigger [[OnSell - ObjectReference|OnSell()]] event.
*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.
*'''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]]
*[[OnSell - ObjectReference]] -- NOTE: SellItem() DOES *NOT* TRIGGER THE OnSell EVENT!

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)