Jump to content

Recommended Posts

Posted (edited)
I'm currently working on a mod and I need NPC's to give keys, could someone help me on making NPCs that give items after talking to the player? Edited by HookerHeels
Posted (edited)

I don't know how much help I'm being, but generally the AddItem function is used in, say, a related quest script to grant the player an item during conversation. The NPC saying something like "Here, take this." gives the illusion that the item came from the NPC.

 

If you would rather the NPC had the item in their inventory and actually gave you that item, you could use RemoveItem, which allows you to remove an item from an inventory, then optionally place that item in another specified inventory.

 

In the following line of code, 1 KEY is removed from NPC's inventory and given to the player.

NPC.RemoveItem(KEY, 1, false, Game.GetPlayer())

Edited by LtMattmoo
  • Recently Browsing   0 members

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