Sets whether a creature leaves a lootable corpse upon death
NPC to set as lootable or not
TRUE or FALSE
Sets the lootable state of a *living* NPC creature.
This function will *not* work on players or dead creatures.
This corresponds to the "leaves lootable corpse" NPC property (under advanced in the NPC's properties).
Only NPCs can be lootable, and their lootable state must be set BEFORE they die.
Simply calling SetLootable doesn't appear to be sufficient to have the NPC leave a lootable corpse. The corpse left behind isn't selectable. To make a corpse lootable, add the two lines of code below to the end of the NPC's OnSpawn script:
author: Lilac Soul