Prop
The prop class represents a prop loaded in the current map.
See also: Maps.Props.
Properties
Section titled “Properties”Type: "Prop"
Always set to “Prop”. Used to differentiate between classes.
Type: MapObject
The MapObject of the prop.
Extras
Section titled “Extras”Type: Extras
Additional data for the specific prop instance.
Interactable
Section titled “Interactable”Type: InteractableDefinition?
Defines the interactability of this prop.
HintTextClient
Section titled “HintTextClient”Type: string?
Text to display to players looking at this prop. This should be set on the client-side from the attached interactable.
Type: Round
A reference to the current round.
Methods
Section titled “Methods”GetHealth
Section titled “GetHealth”Returns the current health of the prop. Returns nil if the prop is not breakable.
Returns
Section titled “Returns”number?
SetHealth
Section titled “SetHealth”Sets the health of the prop. No effect if the prop is not breakable.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
health | number | The new health of the prop. |
TryTakeDamage
Section titled “TryTakeDamage”Attempts to damage the prop with the provided DamageParams. Returns true if the prop was damaged, false otherwise.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
damageParams | DamageParams | The damage parameters. | |
deferDeath | boolean? | Whether to defer OnBreak. |
Returns
Section titled “Returns”boolean