s&box docs

public class Sandbox.DamageInfo

Describes the damage that should be done to something. This is purposefully a class so it can be derived from, allowing games to create their own special types of damage, while not having to create a whole new system.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 3 constructors

Properties

Showing 9 properties

public float Sandbox.DamageInfo.Damage { get; set; }

Amount of damage this should do

public bool Sandbox.DamageInfo.IsExplosion { get; set; }Obsolete

True if this is explosive damage

Obsolete: Use Tags

public Vector3 Sandbox.DamageInfo.Origin { get; set; }

The origin of the damage. For bullets this would be the shooter's eye position. For explosions, this would be the center of the exposion.

public Sandbox.TagSet Sandbox.DamageInfo.Tags { get; set; }

Tags for this damage, allows you to enter and read different damage types etc

public Sandbox.GameObject Sandbox.DamageInfo.Weapon { get; set; }

The weapon that did the damage, or a vehicle etc

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.DamageInfo

On this page