Difference between revisions of "RemoveItem"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>Illyism
(changed to template)
Line 1: Line 1:
=='''Description'''==
{{Function
 
|origin = GECK1
'''RemoveItem''' 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 ''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>
=='''Syntax'''==
|arguments = {{FunctionArgument
 
    |Name = ObjectID
[''ActorID|ContainerID''.]RemoveItem ''ObjectID, Count, MessageHiddenFlag''
    |Type = ref
 
  }}{{FunctionArgument
=='''Examples'''==
    |Name = Count
    |Type = int
  }}{{FunctionArgument
    |Name = HideMessageFlag
    |Type = int
    |Optional = y
  }}
}}
==Examples==


  buddyref.RemoveItem Stimpack 11
  buddyref.RemoveItem Stimpack 11

Revision as of 15:51, 9 March 2009

< [[::Category:Functions|Category:Functions]]

A function included in the GECK version 1.1.0.36.

Description

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).

Syntax

[help]
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.

See Also

AddItem
GetItemCount
RemoveAllItems

Reference

None provided.