Skip to content

Leave Lootable Corpse script?

NeverwinterWightsNeverwinterWights Member Posts: 339
edited February 2021 in Builders - Scripting
If you check the box "Leave Lootable Corpse" on an NPC/Monster and they are killed, what object is left and what script fires when you loot that body? It seems like whats happening is that the body is flagged not destroyable for the decay timer and an invisible object drops at that location? Was thinking it might be "Secret Object", "Corpse" but there is no script attached to that object by default. Any help or information about what happens in this process would be greatly appreciated.

Comments

  • ProlericProleric Member Posts: 1,281
    Not exactly an answer, but x0_i0_corpses contains lots of related functions, from which you might be able to deduce what's going on.

    When a lootable corpse is first created, by default it is still the original creature, which can be reference by tag, checked for being dead, and so on. This seems to persist until certain events occur, such as a player opening the inventory (whether they loot it or not) after which it becomes a loot bag. Once fully looted, the object fades out. I suspect this is an engine function, rather than a script.

    However, there are lots of ways to vary the behaviour by script, as the above collection of functions demonstrates.
  • NeverwinterWightsNeverwinterWights Member Posts: 339
    Thanks @Proleric for a point in the right direction.
Sign In or Register to comment.