Skip to content

GetActorLoot

What a dead actor’s or animal’s body still holds for a search.

GetActorLoot(id)
Parameter Type
id number the actor or animal

table | nil - a list of {class =, amount =, health =} (empty once searched bare); nil for anything but a server actor or animal

-- a body searched bare goes ten seconds later
SetTimer(function()
local left = GetActorLoot(deer)
if left and #left == 0 then DestroyEntity(deer) end
end, 10000, true)

SetActorLoot · OnPlayerLootActor · the NPC actors group of the index