nanos world API Reference Unofficial documentation
Event Shared

Damageable.TakeDamage

Triggered when this Entity takes damage

Syntax

Lua
Damageable.Subscribe("TakeDamage", function(self, damage, bone, type, from_direction, instigator, causer)
    -- il tuo codice
end)

Arguments

Name Type Default Description
self Damageable
damage integer
bone string Damaged bone
type DamageType Damage Type
from_direction Vector Direction of the damage relative to the damaged actor
instigator Player The player which caused the damage
causer any The object which caused the damage

Returns

  • number Return the multiplier to the final damage. Return <code>0</code> to cancel the damage (will still display animations, particles and apply impact forces). The default <code>1.0</code>.