Propclass
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.
Constructors1
Showing 1 constructors
public Prop()
No results match this filter.
Methods7
Showing 7 methods
public void Break()
Delete this component and split into the procedural components that this prop created.
void—public void CreateExplosion()
void—public System.Collections.Generic.List`1<Sandbox.Gib> CreateGibs(bool wasImpact = False)
Create the gibs and return them.
| Parameter | Type | Description |
|---|---|---|
| wasImpact = False | bool | — |
public void Ignite()
void—public void Kill(Sandbox.DamageInfo damage = null)
| Parameter | Type | Description |
|---|---|---|
| damage = null | DamageInfo | — |
void—public void NetworkCreateGibs(bool wasImpact = False)
Create the gibs for this prop breaking, over the network. This causes clients to spawn the gibs too.
| Parameter | Type | Description |
|---|---|---|
| wasImpact = False | bool | — |
void—public void OnDamage(Sandbox.DamageInfo damage)
| Parameter | Type | Description |
|---|---|---|
| damage | DamageInfo | — |
void—No results match this filter.
Properties15
Showing 15 properties
public ulong Sandbox.Prop.BodyGroups { get; set; }
ulong—protected bool Sandbox.Prop.HasBodyGroups { get; set; }
bool—protected bool Sandbox.Prop.HasMaterialGroups { get; set; }
bool—public float Sandbox.Prop.Health { get; set; }
float—public bool Sandbox.Prop.IsExplosive { get; set; }
True if this prop will explode when destroyed.
bool—public bool Sandbox.Prop.IsFlammable { get; set; }
True if this prop can be set on fire.
bool—public bool Sandbox.Prop.IsOnFire { get; set; }
bool—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.
bool—public Sandbox.GameObject Sandbox.Prop.LastAttacker { get; set; }
public string Sandbox.Prop.MaterialGroup { get; set; }
string—public System.Action Sandbox.Prop.OnPropBreak { get; set; }
Action—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.
bool—No results match this filter.