Skip to content

OnActorInjury

A hit wounded one of an actor’s body parts.

The shape of OnPlayerInjury: a blow of at least [combat] injury_threshold injures the part it struck; every client shows the limp. A cut bleeds for [combat] bleed_seconds (GetActorBleeding) and drains the health - a bleed-out is the last attacker’s kill. HealActor makes the actor whole.

function OnActorInjury(id, attacker, part)
-- ...
end
Parameter Type
id number the actor
attacker number the player who struck; -1 = nobody
part number the body part, 1 .. 6

nothing

function OnActorInjury(id, attacker, part)
SendClientMessageToAll(COLOUR_SERVER, GetEntityName(id) .. "'s " .. GetBodyPartName(part):gsub("_", " ") .. " is wounded")
end

OnActorDamage · GetActorInjuries · IsActorBleeding · HealActor · the NPC actors group of the index