Skip to content

SetAnimalAttack

An animal’s bite - its damage and how often it bites.

damage is what a bite takes from a player without armour (armour lowers it, OnActorAttack has the last word); interval the seconds between bites (0.5 at least). 0 gives back the kind’s own: a wolf 12 every 1.6 s, a wild dog 9, a dog 7, a boar 18 every 2.4 s, a red deer stag 14, a bull 20, a hare 2.

SetAnimalAttack(id, damage [, interval])
Parameter Type
id number the animal
damage number health a bite takes (0 = the kind’s own; at most 100)
interval number seconds between bites (0 = the kind’s own) (optional)

boolean - false for anything but an animal, or a negative number

-- the pack's alpha bites harder and faster
SetAnimalAttack(alpha, 20, 1.2)

SetAnimalHostile · OnActorAttack · the NPC actors group of the index