tModLoader v2024.10
A mod to make and play Terraria mods
IEntitySource_OnHit Interface Reference

Used along with EntitySource_Parent. The Attacker is also the EntitySource_Parent.Entity (owner of the effect) More...

Inherited by EntitySource_OnHit.

Properties

Entity Attacker [get]
 The attacking entity. Note that this may be a Projectile (possibly owned by a player), a Player or even a NPC More...
 
Entity Victim [get]
 The entity being attacked. Normally an NPC, but could be an Player if a mod decides to use this source in such a way More...
 

Detailed Description

Used along with EntitySource_Parent. The Attacker is also the EntitySource_Parent.Entity (owner of the effect)

Property Documentation

◆ Attacker

Entity IEntitySource_OnHit.Attacker
get

The attacking entity. Note that this may be a Projectile (possibly owned by a player), a Player or even a NPC

Implemented in EntitySource_OnHit.

◆ Victim

Entity IEntitySource_OnHit.Victim
get

The entity being attacked. Normally an NPC, but could be an Player if a mod decides to use this source in such a way

Implemented in EntitySource_OnHit.