Jump to content

NPC picking up items


Argomirr

Recommended Posts

I'll get straight to business; is there a way to make a NPC pick up an item without using the 'Activate' function? 'Cause the games crashes as soon as an NPC activates an item. Not sure why, though.

 

If there is no other way, what is causing this, and is there a way to fix it? Oh, and I don't mind using OBSE.

 

What do you think? (I sure hope this can be solved, or else I can just throw 200 lines of script away! :P)

Link to comment
Share on other sites

What is it that they are being scripted to pick up?

 

Items that have an onactivate block may cause a crash if they are being picked up with an activate function, or if the item is not within the loaded area.

 

Although technically you could disable the reference, and add a new item to the NPC, this is probably not the best solution since items which are placed in world cannot truely be removed without having someone pick them up. So if this is something you are doing more than once, it may cause bloat.

 

I would probably look closer at the item being activated, and see if the cause can be found.

Link to comment
Share on other sites

I'll give some more details. I'm making a mod that improves the existing servants (and adds new servants to other buyable houses) and I've written a script that's supposed to make them 'clean the floor'. The player drops an item on the floor, and the item triggers a TrigZone, wich tells a script attached to the servant NPC what the item's reference ID is. The NPC will then walk to the item and pick it up. (After that the servant will sort the items; put weapons in the weapon chest, clothing in the clothing drawers etc.) But this is the point where the game crashes. I have no idea why this happens; the none of the items I used have an OnActivate block, and they're all in the same cell as the NPC. I've tried a couple of things, and this seems to be happening on all items I throw on the floor. Everything works fine 'till the NPC activates an item. I've also seen something about an 'animation group note problem', or something like that. Could it be that the NPC's pick up animation causes the game to crash?

 

You're right about disabling the item, that's not a possibility, because this will be repeated over and over. Any ideas?

 

[EDIT]Nevermind, I found a way to fix this problem. Thanks for the help anyway!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...