Difference between revisions of "RemoveItem"
Jump to navigation
Jump to search
imported>Geckbot m (Robot: Automated text replacement (-\[\[Category:(.*?)\(GECK 1.0\)\]\] +Category:\1(GECK 1.1))) |
imported>DewiMorgan m (adding see also entries, and clarification that it destroys items.) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|origin = GECK1 | |origin = GECK1 | ||
|summary = Removes ''Count'' items of object ''ObjectID'' from the calling container's inventory. It has two required parameters (the object to remove and the quantity) and one optional parameter (whether to display a message on screen). | |summary = Removes and destroys ''Count'' items of object ''ObjectID'' from the calling container's inventory. It has two required parameters (the object to remove and the quantity) and one optional parameter (whether to display a message on screen). | ||
|referenceType = <nowiki>ActorID|ContainerID</nowiki> | |referenceType = <nowiki>ActorID|ContainerID</nowiki> | ||
|arguments = {{FunctionArgument | |arguments = {{FunctionArgument | ||
Line 26: | Line 26: | ||
=='''Notes'''== | =='''Notes'''== | ||
*You can use a FormList as the item parameter - in this case, the function removes the count for each item in the list. | *You can use a FormList as the item parameter - in this case, the function removes the count for each item in the list. | ||
*The items are destroyed - despite the name, they are not simply "removed" from the container and placed nearby. | |||
=='''See Also'''== | =='''See Also'''== | ||
Line 31: | Line 32: | ||
[[GetItemCount]]<br> | [[GetItemCount]]<br> | ||
[[RemoveAllItems]]<br> | [[RemoveAllItems]]<br> | ||
[[RemoveAllTypedItems]]<br> | |||
[[RemoveMe]]<br> | |||
[[DropMe]]<br> | |||
=='''Reference'''== | =='''Reference'''== |
Revision as of 21:40, 12 April 2011
< [[::Category:Functions|Category:Functions]]
A function included in the GECK version 1.1.0.36.
Description
Removes and destroys Count items of object ObjectID from the calling container's inventory. It has two required parameters (the object to remove and the quantity) and one optional parameter (whether to display a message on screen).
Syntax
ActorID|ContainerID.RemoveItem ObjectID:ref Count:int HideMessageFlag:int
Examples
buddyref.RemoveItem Stimpack 11
Buddy loses 11 stimpacks
player.RemoveItem SuperStimpak 10
The player loses 10 super stimpacks and message displays like normal
player.RemoveItem SuperStimpak 10 1
10 super stimpacks are removed from the player's inventory and no message would be displayed
Notes
- You can use a FormList as the item parameter - in this case, the function removes the count for each item in the list.
- The items are destroyed - despite the name, they are not simply "removed" from the container and placed nearby.
See Also
AddItem
GetItemCount
RemoveAllItems
RemoveAllTypedItems
RemoveMe
DropMe
Reference
None provided.