DamageInfoclass

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.

objectDamageInfo
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.DamageInfo

Constructors3

Showing 3 constructors

Properties9

Showing 9 properties

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

Amount of damage this should do

Returns:float

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

True if this is explosive damage

Obsolete: Use Tags

Returns:bool

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

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.

Returns:Vector3

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

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

Returns:TagSet

On this page