antstubell Posted September 1, 2012 Share Posted September 1, 2012 Hi all,So at the point in my quest the NPC has "thegift" in its inventory ready for the player to pick up. Player approaches NPC says "You must be NPC, I've come to collect thegift". NPC replys, after checking SetStage=10, "Here you go". SetStage=20 and just missing the scripting where the NPC gives thegift to player. Help please. Link to comment Share on other sites More sharing options...
JanusForbeare Posted September 1, 2012 Share Posted September 1, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much. Link to comment Share on other sites More sharing options...
antstubell Posted September 1, 2012 Author Share Posted September 1, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Link to comment Share on other sites More sharing options...
samv96UK Posted September 1, 2012 Share Posted September 1, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.) Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2012 Author Share Posted September 2, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.)Where should or what should I attach the script to? Link to comment Share on other sites More sharing options...
samv96UK Posted September 2, 2012 Share Posted September 2, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.)Where should or what should I attach the script to? When I use that script I normally put it at the end of dialogue, as a papyrus fragment. Or you can put it in the Quest Stages Papyrus fragment for stage 20 or whenever you want the script to occur. Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2012 Author Share Posted September 2, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.)Where should or what should I attach the script to? When I use that script I normally put it at the end of dialogue, as a papyrus fragment. Or you can put it in the Quest Stages Papyrus fragment for stage 20 or whenever you want the script to occur.At the end of the dialouge in Papyrus Fragments there is no Properties button, in Quest Stages Stage 20 when I click the Properties button nothing happens. Link to comment Share on other sites More sharing options...
samv96UK Posted September 2, 2012 Share Posted September 2, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.)Where should or what should I attach the script to? When I use that script I normally put it at the end of dialogue, as a papyrus fragment. Or you can put it in the Quest Stages Papyrus fragment for stage 20 or whenever you want the script to occur.At the end of the dialouge in Papyrus Fragments there is no Properties button, in Quest Stages Stage 20 when I click the Properties button nothing happens. Firstly, just put in a ; and press compile. That makes a new script. Then click Ok out of all the windows, re-open the quest, right click the new script (In the box in the bottom right hand corner) and click edit properties. Link to comment Share on other sites More sharing options...
antstubell Posted September 2, 2012 Author Share Posted September 2, 2012 Don't worry about "giving" the item to the player, simply removeitem it from the NPCs inventory and additem it to the player's inventory. It will be a different objectreference, of course, but that shouldn't matter too much.Could I bother you to script this for me please? Game.GetPlayer().AddItem(thegift) NPC.RemoveItem(thegift) :thumbsup: (Note that you will have to add "thegift" and "NPC" as properties.)Where should or what should I attach the script to? When I use that script I normally put it at the end of dialogue, as a papyrus fragment. Or you can put it in the Quest Stages Papyrus fragment for stage 20 or whenever you want the script to occur.At the end of the dialouge in Papyrus Fragments there is no Properties button, in Quest Stages Stage 20 when I click the Properties button nothing happens. Firstly, just put in a ; and press compile. That makes a new script. Then click Ok out of all the windows, re-open the quest, right click the new script (In the box in the bottom right hand corner) and click edit properties.Ok thanks. I tried using the Aliases that are already set up in the quest but the script wouldn't have it so I made 2 new properties for thegift - ARMO (necklace) and Actor (NPC). Compiled fine so all seems well. Link to comment Share on other sites More sharing options...
Recommended Posts