Skip to content

SetActorButcher

Lets players butcher a dead animal the game’s own way - or not.

Off by default. With it on, a dead animal that nobody has butchered yet offers the game’s own held “Butcher” to every player within reach: the butcher plays the game’s butchering, which skins the carcass, and takes the game’s own meat for that animal from it (the game’s exchange screen opens on it); the others see the butcher at it, and the carcass stays skinned for everyone, players who come by later too. One player butchers a carcass, once. OnPlayerButcher may refuse a player. It works beside SetActorLoot: what you put on the body is searched as before. Set it at CreateAnimal or at OnActorDeath, and keep the carcass long enough to be found - a dead animal stays until you remove it (DestroyEntity).

SetActorButcher(id [, enabled])
Parameter Type
id number the animal
enabled boolean true (the default) = it may be butchered; false = no butchering (optional)

boolean - false for anything but a server animal

-- hunting grounds: every deer may be butchered by whoever finds it
local deer = CreateAnimal("roe deer buck", x, y, -1, 90)
SetActorButcher(deer, true)

IsActorButchered · OnPlayerButcher · SetActorLoot · CreateAnimal · the NPC actors group of the index