sm.container.collectToSlot

Performs a collect operation to a specific slot.

Kind: Function

Environments: Game

Game

sm.container.collectToSlot(
    container,
    slot,
    itemUuid,
    quantity,
    mustCollectAll
)

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
container Container The container.
slot integer The container slot.
itemUuid Uuid The uuid of the item to be added.
quantity integer The number of items to be added.
mustCollectAll boolean If true, only add items if there is enough room. If false, add as many items as possible. Defaults to true. (Optional)

Returns:

Type Description
integer The number of items successfully added.