public class Sandbox.Prop : Sandbox.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.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public Prop()
No results match this filter.
Methods
Showing 7 methods
public void Break()
Delete this component and split into the procedural components that this prop created.
public void CreateExplosion()
public System.Collections.Generic.List`1<Sandbox.Gib> CreateGibs()
Create the gibs and return them.
public void Ignite()
public void Kill()
public void NetworkCreateGibs()
Create the gibs for this prop breaking, over the network. This causes clients to spawn the gibs too.
public void OnDamage(Sandbox.DamageInfo damage)
No results match this filter.
Properties
Showing 14 properties
public ulong Sandbox.Prop.BodyGroups { get; set; }
protected bool Sandbox.Prop.HasBodyGroups { get; set; }
protected bool Sandbox.Prop.HasMaterialGroups { get; set; }
public float Sandbox.Prop.Health { get; set; }
public bool Sandbox.Prop.IsFlammable { get; set; }
True if this prop can be set on fire.
public bool Sandbox.Prop.IsOnFire { get; set; }
public bool Sandbox.Prop.IsStatic { get; set; }
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.
public Sandbox.GameObject Sandbox.Prop.LastAttacker { get; set; }
public string Sandbox.Prop.MaterialGroup { get; set; }
public System.Action Sandbox.Prop.OnPropBreak { get; set; }
public System.Action`1<Sandbox.DamageInfo> Sandbox.Prop.OnPropTakeDamage { get; set; }
public bool Sandbox.Prop.StartAsleep { get; set; }
Physics will be asleep until it's woken up.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Prop |