Jump to content

Making NPCs store items in chests


Rumblefish3d

Recommended Posts

If this has already been done/discussed I can't find it. I've been googling for over an hour and also working in CS for several hours trying to get this to work.

 

I have an NPC with a gold nugget in his inventory and I have a chest that he walks up to at 8am.

I need to get him to put the nugget in the chest then that nugget would be available for pickup.

 

It's not working... he gets to the chest but never puts anything in it.

 

Is it even possible to get an NPC to place an item in-to a container?

 

Please help, and thanks in advance.

 

Again I apologize if this has already been discussed, a link to that discussion would be great.

Link to comment
Share on other sites

It is, and here's the way I use:

 

1. Make a quest script

2. Put scn NAMEOFYOURSCRIPT

3. Put short [VARIABLE] on a line below

4. Make sure it says QUEST not Object or Magic Effect in the drop down box on the top right corner

5. Save

6. Attach script to quest

7. Go to AI package

8. Click Conditions

9. Right click and hit new

10. Find and select "GetQuestVariable"

11. In the drop down that appears for the condition find your quest and then the variable

12. Make it == 1 on the other side when your done selecting

13. Make a script on the NPC

 

I can't really think of a script off the bat, as I can't remember the AI package commands right now. It involves when the actor is at the AI target, then utilizing the RemoveItem and AddItem commands.

Link to comment
Share on other sites

I dont understand what LF was saying but you can write a script on the chest that goes something like this

 

Begin onactivate yourrefid

if yourrefid.getitemcount goldnugget >=1

yourrefid.removeitem goldnugget1

yourchest .additem goldnugget1

endif

end

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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