Gam3r87 Posted February 2, 2016 Share Posted February 2, 2016 from my faction mod i want to know what you need to put to get a key though a dialogue at first i thought player.additem then the editor id of the key but its not an item so just want to know how you get the npc to give u a key thats it Link to comment Share on other sites More sharing options...
wollington Posted February 4, 2016 Share Posted February 4, 2016 Sorry, what do you mean? Are you saying that you're trying to get a key that you need to acquire through a dialogue with some dude, but he won't give it to you? What faction mod is it? Link to comment Share on other sites More sharing options...
Jokerine Posted February 4, 2016 Share Posted February 4, 2016 Hey Gam3r87! Here are the basic steps to make an NPC give a key. 1. Give your NPC an internal variable in their script ("int GaveKey").2. Condition the dialogue topic (where the NPC will say something like "here is the key") with GetScriptVariable == 0 for the GaveKey int and GetItemCount for caps (if the player will be buying it)3. Add an End result script to the "Here is the key" response with "Player.AddItem KeyID 1" and "Set NPCREF.GaveKey to 1". Also tick it say once. That should make it so the NPC will only give the player the key once. If you are not sure how to do this, take a look at my edit of your Snow Cabin mod and you can see how the key is given to the player. Hit me up if you have any questions! :) Link to comment Share on other sites More sharing options...
Gam3r87 Posted February 9, 2016 Author Share Posted February 9, 2016 Thanks Jokerine Link to comment Share on other sites More sharing options...
Recommended Posts