Seiipher Posted December 19, 2014 Share Posted December 19, 2014 I'm trying to make a vending machine take all of the Sarsaparilla and Nuka-Cola from the player's inventory and put them in the vending machine, but when I press the button in game to put the items in the machine nothing happens. Been at this for hours, help me please D: scn VendingMachineScript Begin OnActivate showmessage VendingMachine End Begin MenuMode set button to getbuttonpressed if button == 0 player.RemoveAllTypedItems VendingMachineOutside 0 1 47 VendingFormList endif if button == 1 VendingMachineOutside.removeitem SSBottleFull 1 Player.additem SSBottleFull 1 endif if button == 2 VendingMachineOutside.removeitem NukaCola 1 player.additem NukaCola 1 endif end Link to comment Share on other sites More sharing options...
Ladez Posted December 19, 2014 Share Posted December 19, 2014 Try using a GameMode block instead of MenuMode. As soon as you press a button, the game returns to GameMode, preventing any MenuMode blocks from running. Link to comment Share on other sites More sharing options...
Seiipher Posted December 20, 2014 Author Share Posted December 20, 2014 (edited) Still no dice, but both of the vending buttons work with both menumode and gamemode. So it's the RemoveAllTypedItems line that isn't working Edited December 20, 2014 by Seiipher Link to comment Share on other sites More sharing options...
Seiipher Posted December 20, 2014 Author Share Posted December 20, 2014 When I removed the formlist it worked, removed all of the alchemy items in my inventory... Link to comment Share on other sites More sharing options...
Siiepher Posted December 20, 2014 Share Posted December 20, 2014 Alright I figured it out, the form list for RemoveAllTypedItems is an exemption list. So it will remove all items except the ones on the form list. Link to comment Share on other sites More sharing options...
Siiepher Posted December 20, 2014 Share Posted December 20, 2014 I now have it set not to remove all vanilla "aid" items so that it only removes the Sarsaparilla and Nuka-Cola from the player's inventory, is there any way I could also make it compatible with modded "aid" items? Would I have to make a separate esp for each mod? Link to comment Share on other sites More sharing options...
Siiepher Posted December 20, 2014 Share Posted December 20, 2014 HAHAHA! I figured out how to do it! Had to set short variables for how much Soda was in the players inventory and just use removeitem and additem commands. Link to comment Share on other sites More sharing options...
Ladez Posted December 20, 2014 Share Posted December 20, 2014 Yes, that would be the most appropriate method. Glad to see you figured it out. ;) Link to comment Share on other sites More sharing options...
Recommended Posts