Exile007 Posted June 29, 2008 Share 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. Link to comment Share on other sites More sharing options...
e-varmint Posted June 30, 2008 Share Posted June 30, 2008 It may work if you uncheck the "Disarmable" box in the "Advanced" tab of the .utc file. Link to comment Share on other sites More sharing options...
Exile007 Posted June 30, 2008 Author Share Posted June 30, 2008 Thanks, I'll test that out now. Link to comment Share on other sites More sharing options...
stoffe Posted June 30, 2008 Share 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). Link to comment Share on other sites More sharing options...
Exile007 Posted June 30, 2008 Author Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.