nanos world API Reference Unofficial documentation
Function Server Moderate

Damageable:ApplyDamage

Do damage to this entity, will trigger all related events and apply modified damage based on bone. Also will apply impulse if it's a heavy explosion

Syntax

Lua
my_damageable:ApplyDamage(damage, bone_name = "", damage_type = DamageType.Shot, from_direction = Vector(0, 0, 0), instigator = nil, causer = nil)

Parameters

Name Type Default Description
damage integer
bone_name optional string ""
damage_type optional DamageType DamageType.Shot
from_direction optional Vector Vector(0, 0, 0)
instigator optional Player nil The player which caused the damage
causer optional any nil The object which caused the damage

Returns

  • integer the damage applied