Exile007 Posted June 29, 2008 Posted June 29, 2008 Hello there everyone. I've been trying to script it so that when an npc dies, it disappears. Now I know I could use the userdefine method to do this, but I want the PC to be able to still gain experience from killing the enemies, even if they disappear. So, I attatched this script to the On-Death portion of the creature's .utc void main() { DestroyObject(OBJECT_SELF); } This works fine for the most part, however the NPC will still in essence drop loot. Considering that the NPC just disappeared it makes no sense for loot to be dropped. If anyone could point me out in the right direction I would appreciate it.
e-varmint Posted June 30, 2008 Posted June 30, 2008 It may work if you uncheck the "Disarmable" box in the "Advanced" tab of the .utc file.
stoffe Posted June 30, 2008 Posted June 30, 2008 This works fine for the most part, however the NPC will still in essence drop loot. Considering that the NPC just disappeared it makes no sense for loot to be dropped. If anyone could point me out in the right direction I would appreciate it. The most straightforward way of doing that would be to make sure the NPCs have no loot to drop. Set all their equipped items as undroppable and give them a custom OnSpawn script that does not give them any random loot (remove the PlaceCritterTreasure() function call if this is for TSL).
Exile007 Posted June 30, 2008 Author Posted June 30, 2008 The most straightforward way of doing that would be to make sure the NPCs have no loot to drop. Set all their equipped items as undroppable and give them a custom OnSpawn script that does not give them any random loot (remove the PlaceCritterTreasure() function call if this is for TSL). Ah, thanks stoffe. I never would have guessed that loot was generated via spawn-in scripts.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.