Item
The item class represents an instance of an item. Components are initially replicated from the server to the client when an item is picked up, but subsequent changes to components on the server will not replicate until the item is picked up again. Changes to components on the client-side will be lost when the item is dropped.
Properties
Section titled “Properties”Type: "Item"
Always set to “Interactable”. Used to differentiate between classes.
Extras
Section titled “Extras”Type: {[any]: any}
Used to store additional information about the item.
Type: ItemComponents
The base item components used by this item.
Components
Section titled “Components”Type: ItemComponents
Stores the per-item components.
Methods
Section titled “Methods”GetServerData
Section titled “GetServerData”Retrieves the data that will be sent to the server.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| action | "Primary" | "Alternate" | The firing action to retrieve data for. |
Returns
Section titled “Returns”unknown
SetServerData
Section titled “SetServerData”Sets data to be sent to the server.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| action | "Primary" | "Alternate" | The firing action to set data for. |
| data | unknown | The data to set. |
ResetLastUse
Section titled “ResetLastUse”Resets the last use time for the specified action, bypassing the cooldown.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| action | "Primary" | "Alternate" | The firing action to set data for. |