Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

DamageRefusedRecord

One hit dealDamage refused, as DamageRefusedEvent carries it: the hit as it was asked, where its target stood, and why it applied nothing.

Property Type Description
amount number The health asked, the zone’s multiplier in it, which can be more than the entity had.
at Vector3 Where the target stood, the origin for one with no position.
data Readonly<Readonly<Record<string, unknown>>> | null What the weapon or the game’s own call attached; null for none.
instigatorPlayer PlayerEntity | null The player behind the hit as it was judged; null for an NPC’s hit, one from no one, or once the player left.
instigatorTeam string | null The key of the team the hit was judged for, null for none, as TeamChangedEvent names a team: a record crosses the network as plain values, and findTeamByKey turns the key back into its handle. It stays once its player left.
reason DamageRefusal Why it applied nothing: friendly fire before invulnerability.
source Entity | null The entity that dealt it, such as a shooter’s character; null for no one, or once it is gone.
weapon string | null The weapon’s name as registerWeapon names it; null for damage from none.
zone string | null The name of the entity’s HitZonesTrait zone it struck, such as "head", its multiplier already in amount; null for its body.