Api Sandbox Prop
class

Prop

public class Prop : Component

A prop is defined by its model. The model can define its health and what happens when it breaks. This component is designed to be easy to use - since you only need to define the model. Although you can access the procedural (hidden) components, they aren't saved, so it's a waste of time.

Constructors

Prop()

Properties

Name Type Description
Model Model
BodyGroups UInt64
MaterialGroup String
Tint Color
Health Single
IsStatic Boolean If the prop is static - it won't have dynamic physics. This is usually used for things that you want to be breakable but don't move. Like fences and stuff.
StartAsleep Boolean Physics will be asleep until it's woken up.
OnPropBreak Action
OnPropTakeDamage Action<DamageInfo>
IsFlammable Boolean True if this prop can be set on fire.
IsOnFire Boolean
LastAttacker GameObject

Methods

Void OnDamage(DamageInfo damage)
Void Ignite()
Void Kill()
Void CreateExplosion()
Void NetworkCreateGibs()

Create the gibs for this prop breaking, over the network. This causes clients to spawn the gibs too.

List<Gib> CreateGibs()

Create the gibs and return them.

Void Break()

Delete this component and split into the procedural components that this prop created.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.Prop