Skip to content

five-on-it / packages/sim/src/damage / applyDamage

Function: applyDamage() ​

applyDamage(sim, eid, amount, owner, weapon, point, push?, nonLethal?): void

Defined in: packages/sim/src/damage.ts:237

Hurts an entity (see hurt) and lets it fall: a pedestrian falls on any hit (but a non-lethal one; a dog only when it kills it); anyone falls at zero and lies dead until the character system respawns them; a vehicle at zero is wrecked. An invincible character stands.

Parameters ​

sim ​

SimWorld

eid ​

number

amount ​

number

owner ​

number

weapon ​

number

point ​

x ​

number

y ​

number

z ​

number

push? ​

x ​

number

z ​

number

nonLethal? ​

boolean = false

Returns ​

void