C6Aviation Posted June 27, 2009 Share Posted June 27, 2009 I'm trying to make a terminal-based vending machine to buy rare weapons, ammo, armor, and misc items(Right now, just hard to find ones in Fallout 3 and 20th CW, but possibly from other mods as well). What I've already gotten it to do is vend a weapon and subtract caps. Child's play, need two console commands. Thing is, I want it to check the PC's caps and deny a vend if the caps are lower than the price of the item the PC wants to purchase. As it is, I can vend all the guns and ammo I want, it will simply drop my caps deeper into the red. What command would I put into the terminal, instead of "player.additem 0000000A -<price>", to make it do this? Link to comment Share on other sites More sharing options...
BadPenney Posted June 27, 2009 Share Posted June 27, 2009 Conditionalize your script. For instance: If player.GetItemCount Caps001 >= (price amount)player.additem 0000000A 1player.removeitem Caps001 (price amount)elseshowMessage InsufficientFundsendif You would have to create the message, and you don't really need it, but it would let the player know why the transaction didn't work. Link to comment Share on other sites More sharing options...
C6Aviation Posted June 27, 2009 Author Share Posted June 27, 2009 Ahh, yes. Works perfectly. :) Now, to make some denied messages....whoo. Thanks. Edit: :) Yay. Now, to expand it(Right now it sells two types of CALIBR ammo and three 20th cent guns) and mount it on it's own terminal. Link to comment Share on other sites More sharing options...
Recommended Posts