Carnatics Posted September 1, 2013 Share Posted September 1, 2013 (edited) I have here a very strange bug when i call the barter menu through a dialogue scriptit shows the menu perfect and the bartering mechanics also workBUT if i only buy something the caps get transfered but the bought item vanishes and never appear in my inventory Additional info of how it should be I talk to NPC X (X can be every npc)this script calls a dummy NPC and uses his vendorchest so i talk to a wastelander and choose this particular topic[brter]Lets Trade#the result script begin says DummyNpcBarterChest.AddItem VendorList 1And the result script end says DummyNpcREF.ShowbarterMenu SetStage.BarterQuest 20The Quest Stage result script says DummyNpcBarterChest.RemoveAllItems SetStage.BarterQuest 10 Edited September 1, 2013 by Carnatics Link to comment Share on other sites More sharing options...
jazzisparis Posted September 3, 2013 Share Posted September 3, 2013 For the purpose of debugging, check what happens when you remove the line DummyNpcBarterChest.RemoveAllItems from the quest stage. Though I've never done anything of this sort (merchant NPCs), I suspect it could be the culprit. It may be a problem of timing - you may need to wait a few frames, after the transaction is complete, and only then call RemoveAllItems. Link to comment Share on other sites More sharing options...
Carnatics Posted September 4, 2013 Author Share Posted September 4, 2013 For the purpose of debugging, check what happens when you remove the line DummyNpcBarterChest.RemoveAllItems from the quest stage. Though I've never done anything of this sort (merchant NPCs), I suspect it could be the culprit. It may be a problem of timing - you may need to wait a few frames, after the transaction is complete, and only then call RemoveAllItems. sorry for my late answeri was rebuild the whole thing ,now it works like a charm :)btw your idea about the bug was right btw it is because there runs a single frame when you accept a tradeso all i did was the remove command in the begin line and the add command in the endline ;) Link to comment Share on other sites More sharing options...
Recommended Posts