ingraved Posted January 31, 2010 Share Posted January 31, 2010 I am creating a mod to add weight to ammo. I realize this has been done before. My dilemma is that I am currently not at my home computer which has FO3 and geck installed on it. I am writing a script that will add and item called Ammo Box to my inventory with a weight of 1 to the ammount of ammo weight I wish to applyScriptname Ammoweightscript ref ammowght Begin GameMode set ammowght to (player.getitemcount 32caliber*.01 + player.getitemcount missle + player.getitemcount mininuke*3 + player.getitemcount 308caliber*.05 + player.getitemcount 44caliber*.02) if (ammowght-1) >= player.getitemcount AmmoBox player.additem AmmoBox (ammowght - player.getitemcount AmmoBox) 1 elseif ammowght < player.getitemcount AmmoBox player.removeitem AmmoBox (player.getitemcount AmmoBox - ammowght) 1 endif EndI know the script is not 100% accurate, I can write most of it with confidence. although I would like to know if I can set my ammowght variable to the combined weight calculation I have in this scripted or if I have to go about it a different method EDIT: I clicked post instead of preview :wallbash: Link to comment Share on other sites More sharing options...
ingraved Posted February 1, 2010 Author Share Posted February 1, 2010 I was able to figure out the answer on my own. The answer is NO, the script line cannot exceed 512 characters. Link to comment Share on other sites More sharing options...
pkleiss Posted February 1, 2010 Share Posted February 1, 2010 Your ammowght variable need to be a float and not a ref.You can still do it by having several command lines: Set Ammowght to (player.getitemcount ammo10mm * 0.05) + (player.getitemcount ammo32calibur *0.02)Set Ammowght to Ammowght + (player.getitemcount ammo308calibur * 0.05) + (player.getitemcount ammo44magnum *0.06) ect, etc... Link to comment Share on other sites More sharing options...
Recommended Posts