Guide 1 Docs 2 Reference 3

Function of EntitySpec

entitySpec.on_damage

Asked when a player hits it: answer "take" or "ignore". Nil or a missed deadline is "take". by is the player who hit.

entitySpec.on_damage((e: EntityHandle, amount: number, by: Player?) -> ("take" | "ignore")?) → ?

Parameters

(eEntityHandle, amount: number, by: Player?) -> ("take" | "ignore")optional

Returns

?