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.
Syntax
Section titled “Syntax”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 |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnActorInjury(id, attacker, part) SendClientMessageToAll(COLOUR_SERVER, GetEntityName(id) .. "'s " .. GetBodyPartName(part):gsub("_", " ") .. " is wounded")endSee also
Section titled “See also”OnActorDamage · GetActorInjuries · IsActorBleeding · HealActor · the NPC actors group of the index
