HitInfo
Defined in: server/api.d.ts:530
What a hit event’s handlers may change before the hit lands.
Properties
Section titled “Properties”bash:
boolean
Defined in: server/api.d.ts:544
A blow struck with a gun’s stock, a bash, rather than a shot or a melee weapon’s swing, as the game’s “Mod Bashing Damage” perks tell it: weapon is the gun.
damage
Section titled “damage”damage:
number
Defined in: server/api.d.ts:534
What the victim is dealt when the event was raised: the event’s damage. A copy, as everything a handler is handed: assigning it changes nothing, setDamage does.
setDamage
Section titled “setDamage”setDamage: (
damage) =>void
Defined in: server/api.d.ts:539
Changes what the victim is dealt, 0 to 1000000: a durability or armor system scales the hit here. 0 deals nothing. Several handlers may call it; the last call wins. Throws once the hit was dealt, for a handler that kept it.
Parameters
Section titled “Parameters”damage
Section titled “damage”number
Returns
Section titled “Returns”void