TimeShadow Posted November 28, 2015 Share Posted November 28, 2015 I have been having a hard time getting this script to work. It will not go past the first ShowMessage, regardless what I do. Anyone who has scripting experience at all and are willing to help I would really appreciated it. ; Pressing .308 cal. Ammunition Int AmmoCount5 Int AmmoCount556 Int AmmoCount32 Int AmmoCount10 Int AmmoCount44 Int AmmoCount12 Int AmmoCount308 Set AmmoCount5 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo5mm) Set AmmoCount556 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo556mm) Set AmmoCount32 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo32Caliber) Set AmmoCount10 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo10mm) Set AmmoCount44 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo44Magnum) Set AmmoCount12 to (aaBMHWorkbenchReloadCont01REF.GetItemCount AmmoShotgunShell) IF (AmmoCount5 < 1) || (AmmoCount556 < 1) || (AmmoCount32 < 1) || (AmmoCount10 < 1) || (AmmoCount44 < 1) || (AmmoCount12 < 1) ShowMessage aaBMHBARBTermSubAmmoPressEmptyMSG Else If (AmmoCount5 > 0) || (AmmoCount556 > 0) || (AmmoCount32 > 0) || (AmmoCount10 > 0) || (AmmoCount44 > 0) || (AmmoCount12 > 0) Set AmmoCount5 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo5mm) If ( AmmoCount5 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1 Elseif ( AmmoCount5 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 10 Elseif ( AmmoCount5 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 100 set AmmoCount5 to 0 Endif Set AmmoCount556 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo556mm) If ( AmmoCount556 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo556mm 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1 Elseif ( AmmoCount556 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo556mm 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 10 Elseif ( AmmoCount556 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo556mm 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 100 set AmmoCount556 to 0 Endif Set AmmoCount32 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo32Caliber) If ( AmmoCount32 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo32Caliber 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1 Elseif ( AmmoCount32 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo32Caliber 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 10 Elseif ( AmmoCount32 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo32Caliber 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 100 set AmmoCount32 to 0 Endif Set AmmoCount10 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo10mm) If ( AmmoCount10 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo10mm 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1 Elseif ( AmmoCount10 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo10mm 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 10 Elseif ( AmmoCount10 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo10mm 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 100 set AmmoCount10 to 0 Endif Set AmmoCount44 to (aaBMHWorkbenchReloadCont01REF.GetItemCount Ammo44Magnum) If ( AmmoCount44 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo44Magnum 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 2 Elseif ( AmmoCount44 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo44Magnum 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 20 Elseif ( AmmoCount44 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo44Magnum 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 200 set AmmoCount44 to 0 Endif Set AmmoCount12 to (aaBMHWorkbenchReloadCont01REF.GetItemCount AmmoShotgunShell) If ( AmmoCount12 == 3 ) aaBMHWorkbenchReloadCont01REF.RemoveItem AmmoShotgunShell 3 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 2 Elseif ( AmmoCount12 == 30 ) aaBMHWorkbenchReloadCont01REF.RemoveItem AmmoShotgunShell 30 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 20 Elseif ( AmmoCount12 == 300 ) aaBMHWorkbenchReloadCont01REF.RemoveItem AmmoShotgunShell 300 aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 200 set AmmoCount12 to 0 Endif Else ShowMessage aaBMHBARBTermSubAmmoPressFailMSG EndIf EndIf This is for an Ammo Press and will be entered into a Terminal, hence no BEGIN and END.Also this is just the script for pressing .308 cal., there will be one for each ballistic round. Thanks, ~TS Link to comment Share on other sites More sharing options...
AbbaddoN33 Posted November 28, 2015 Share Posted November 28, 2015 hi! im not an expert, but ill try to help...well, i can see this: " If ( AmmoCount5 == 3 )aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm 3aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1Elseif ( AmmoCount5 == 30 )" maybe must be this: " If ( AmmoCount5 >= 3 )&&( AmmoCount5 <30)aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm 3aaBMHWorkbenchCont01REF.AddItem Ammo308Caliber 1Elseif ( AmmoCount5 >= 30 )&&(AmmoCount5 <300)" and so...etc. maybe? :) Link to comment Share on other sites More sharing options...
TimeShadow Posted November 29, 2015 Author Share Posted November 29, 2015 Thank you for your help,I was feeling a bit left out and abandoned.I will give that a try. I was trying " If ( AmmoCount5 >= 3, < 30 )" which did nothing.Also had to add AmmoCount5 to "aaBMHWorkbenchReloadCont01REF.RemoveItem Ammo5mm AmmoCount5 3". Thanks again. Link to comment Share on other sites More sharing options...
AbbaddoN33 Posted November 29, 2015 Share Posted November 29, 2015 youre welcome! ill help you again, if you want it.. :) (excuse my english ;D ) Link to comment Share on other sites More sharing options...
KimberJ Posted November 29, 2015 Share Posted November 29, 2015 Sure I'll help you, keep it simple obscript an make something else. LOL, all the people I see with these problems are making these gigantic complexity scripts. I wonder if there's even anything like that in the vanilla game scripting. It's almost like looking at two different languages, those working at a job, an those working off pure passion. Seems to me like an ammo press would require tooling up for each ammo type, meaning a menu, which people hate, or making a press for each type, an then tie it into settlement building. Doesn't get much more simple than that. Just a thought. Link to comment Share on other sites More sharing options...
Jokerine Posted December 5, 2015 Share Posted December 5, 2015 LOL, all the people I see with these problems are making these gigantic complexity scripts. And your opinion about this helps how? Seems to me like an ammo press would require tooling up for each ammo type, meaning a menu, which people hate, or making a press for each type, an then tie it into settlement building. Doesn't get much more simple than that. Just a thought. I get the feeling you may be thinking about the wrong game here. Anyhoo, I'm not sure what exactly you're trying to do here, Shadow. If it's a terminal script, couldn't you just mess with conditioning the terminal entries directly to simplify the script a bit? But yeah, it wouldn't hurt to at least explain what the objective of this is. If you're trying to calculate how many pieces of ammo the player has to give them back a varied amount of stuff, it may just be simpler to take in items in fixed amounts (so make a subterminal for, say, 10mm ammo, and make it so the player can "press" it or whatever in groups of 5 or 10) just to get the thing to work. I'm sure you could come up with a lore explanation for it later ;) Link to comment Share on other sites More sharing options...
AbbaddoN33 Posted December 6, 2015 Share Posted December 6, 2015 hi timeshadow! how is your mod going? :) Link to comment Share on other sites More sharing options...
TimeShadow Posted December 12, 2015 Author Share Posted December 12, 2015 (edited) Sorry for the late response,Sometimes I feel that this mod is a bit late to the party, now that FO4 is out. Just wonder if anyone is playing FO3 anymore.I started this mod in July of 2013 and have over 2000+ hours in it. Was hoping that many could enjoy it, since that's one of the few ways that most of modders get appreciation. Who knows maybe the few that find it will like it. P.S.And as for the Ammo Press part, I changed the script and solved a little differently. So it works now. Thanks for your help and concern, ~TS Edited December 12, 2015 by TimeShadow Link to comment Share on other sites More sharing options...
Recommended Posts