Skip to content
This repository has been archived by the owner on Feb 21, 2023. 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:

Type Name Default Description
ItemType type ItemType.NULL Filters the list by ItemType.
bool world_only false Determines 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:

Type Name Default Description
Vector pos none The new position of the Item.

Item.SetKinematic(bool doPhysics)

Sets the kinematic value of the Item.

Parameters:

Type Name Default Description
bool doPhysics none Whether 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

Server Guides

API Documents

Clone this wiki locally