Skip to content
This repository was archived by the owner on Jun 14, 2025. It is now read-only.
BananaCake2Day edited this page Mar 3, 2019 · 4 revisions

Methods

Item.Remove()

If the item is InWorld, removes the Item from the world. If it is part of an inventory, it removes the item from the inventory.

Item.Drop()

Drops the item as if a player has dropped it from their inventory. Will only drop the item if InWorld is false.

Getting

Item.GetPosition()

Gets the position of the Item. If it is an inventory item, gets the position of the Player that holds it.

Returns: Vector

Item.GetKinematic()

Gets the kinematic value of the Item. If InWorld is false, will always return false.

Returns: bool

Item.GetItems(ItemType type, bool world_only)

Static method. Gets all of the items in the world. If world_only is false, will also search through player inventories to find items. The type parameter can be used to filter the type of item to find.

Parameters:

TypeNameDefaultDescription
ItemTypetypeItemType.NULLFilters the list by ItemType.
boolworld_onlyfalseDetermines if the method will also search through player inventories to find items.

Returns: List<Item>

Setting

Item.SetPosition(Vector pos)

Sets the position of the Item.

Parameters:

TypeNameDefaultDescription
VectorposnoneThe new position of the Item.

Item.SetKinematic(bool doPhysics)

Sets the kinematic value of the Item.

Parameters:

TypeNameDefaultDescription
booldoPhysicsnoneWhether to do physics or not.

Properties

Item.InWorld

Returns if the item is in the world. Read only.

Field Value: bool

Item.ItemType

Returns the ItemType of the item. Read only.

Field Value: ItemType

Clone this wiki locally