Container.collect

Adds a quantity of a given item to a container.

Kind: Function

Environments: Game

Game

container:collect( itemUuid, quantity, mustCollectAll )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
container Container The container.
itemUuid Uuid The uuid of the item.
quantity integer The number of items.
mustCollectAll (optional) boolean Must collect all items for the transaction to be valid. Defaults to true. (Optional)

Returns:

Type Description
integer The number of items successfully added.