Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.hook.EntityTakeDamage

S๐Ÿท๏ธ Hooks

Part of StarfallEx namespace

๐Ÿ”— External
hook.add("EntityTakeDamage", "name", function(target, attacker, inflictor, amount, type, position, force) end)
View on GitHub|lua/starfall/libs_sh/hook.lua:214
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Called when an entity is damaged

Parameters

NameTypeDescription
targetEntityEntity that is hurt
attackerEntityEntity that attacked
inflictorEntityEntity that inflicted the damage
amountnumberHow much damage
typenumberType of the damage
positionVectorPosition of the damage
forceVectorForce of the damage

Returns

TypeDescription
booleanReturn true to prevent the entity from taking damage

Examples

No examples available.

Used In

No usages found in the codebase.