swiftlys2/docs/api/ai/
API Reference Events

IOnEntityTakeDamageEvent

Interface
Namespace: SwiftlyS2.Shared.Events · Assembly: SwiftlyS2.CS2.dll
[Obsolete("This event is deprecated and will be removed in future versions. Use GameHooks.Entities.TakeDamage instead.")]
public interface IOnEntityTakeDamageEvent

Called when an entity takes damage.

View source

Properties

DamageResult

The damage result. Throws InvalidOperationException when the native call did not provide a result. Use Entities to access the nullable native result.

ref CTakeDamageResult DamageResult { get; }
Property Value

Entity

The entity that took damage.

CEntityInstance Entity { get; }
Property Value

Info

The damage info.

ref CTakeDamageInfo Info { get; }
Property Value

Result

If return Stop or CancelOriginal, the damage will not be applied.

HookResult Result { get; set; }
Property Value