Hi all,
Just in case you have problems with lootable corpses (see bug: https://support.baldursgate.com/issues/36182 )
The bug seems to be related with the bDestroyableFlag of the SetIsDestroyable function. Setting this flag to false is usually done to control the “decay time” of the corpse because there is no script function to configure it. Unfortunately if you set the bDestroyableFlag to false, the creature inventory will not pop up if you click on the corpse… and if you set it to true, the corpse may disappear too fast.
Solution: If you use NWNX, just add these lines to the onspawn script
NWNX_Creature_SetCorpseDecayTime(OBJECT_SELF, 125000);
SetIsDestroyable( TRUE, FALSE, TRUE);
SetLootable(OBJECT_SELF, TRUE);
Don’t forget to include nwnx_creature!
EDIT: I forgot to say that the 125000 is the decay time of the corpse in milliseconds, change it to suit your needs.