Checks
Contains a set of functions to check that an item can be used.
Functions
Section titled “Functions”Returns true if the item has enough ammo. Returns true if ammo is nil.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. |
Returns
Section titled “Returns”boolean
Scoped
Section titled “Scoped”Returns true if scoped-in on a ScopeRequired item. This only functions the client. Returns true if not ScopeRequired.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. |
Returns
Section titled “Returns”boolean
Reloading
Section titled “Reloading”Returns true if not reloading.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. |
Returns
Section titled “Returns”boolean
ActionEnabled
Section titled “ActionEnabled”Returns true if the specified action is enabled.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. | |
action | `“Primary” | “Alternate” | The action to check. |
Returns
Section titled “Returns”boolean
GamePhase
Section titled “GamePhase”Returns true if the game-phase is valid.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. | |
phase | Phase | The current round phase. |
Returns
Section titled “Returns”boolean
Interval
Section titled “Interval”Returns true if the not firing too quickly.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. |
Returns
Section titled “Returns”boolean
TargetDistance
Section titled “TargetDistance”Returns true if the target is within valid distance.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
item | Item | The item. | |
origin | Vector3 | The origin of the action. | |
destination | Vector3 | The target position. | |
target | BasePart? | The target part. |
Returns
Section titled “Returns”boolean
RaycastStatic
Section titled “RaycastStatic”Returns true if the target is not obscured by static geometry.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
map | Map | The current map. | |
origin | Vector3 | The origin of the action. | |
destination | Vector3 | The target position. | |
target | BasePart? | The target part. |
Returns
Section titled “Returns”boolean