MateoElFidel Posted July 10, 2011 Share Posted July 10, 2011 I once made a mod in FO3 that had a terminal that you could buy things from with sufficient amount of caps, ranging from pistols to missile launchers, but i cant get to make it work in FNV. my original script was: Player.Removeitem caps001 100Player.Additem (Weapon Name) 1end. and i modified it to: if Player.Getitemcount Caps001 = 100Player.Removeitem caps001 100Player.Additem (Weapon Name) 1endif because it bought items even if you had insufficient caps. but now it doesnt work. can anyone help? Link to comment Share on other sites More sharing options...
NorthWolf Posted July 10, 2011 Share Posted July 10, 2011 if Player.Getitemcount Caps001 == 100 Player.Removeitem caps001 100 Player.Additem (Weapon Name) 1 endif There's a difference between assignment '=' and comparison '==' operators. You need to use '==' in comparison operations. Link to comment Share on other sites More sharing options...
Skevitj Posted July 10, 2011 Share Posted July 10, 2011 Using greater than or equal to ">=" would be a better option, as using an equality test would only allow you to purchase the piece when the PC has exactly 100 caps in their inventory, as opposed to being able to buy when they have at least 100. Link to comment Share on other sites More sharing options...
NorthWolf Posted July 10, 2011 Share Posted July 10, 2011 Should've read the entire thing. Derp. Skevitj is right. Functionally you're going to want to use a >= or you'll only ever be able to use it when you have precisely 100 caps. Link to comment Share on other sites More sharing options...
MateoElFidel Posted July 10, 2011 Author Share Posted July 10, 2011 Thank you, managed to get it to work.now i need to find out how to upload it, no need help on that, im sure im gonna find out on my own. Link to comment Share on other sites More sharing options...
Recommended Posts