AntiNovel Posted June 25, 2014 Share Posted June 25, 2014 Hi guys, So I have a terminal set up in the geck (and in the game) that has options to repair all items in my current inventory when I select it. Currently it works like this: short PArmor Set PArmor to (Player.GetItemCount ArmorBoomerWeldingHelmet) Player.RemoveItem ArmorBoomerWeldingHelmet PArmor Player.AddItem ArmorBoomerWeldingHelmet PArmor Set PArmor to (Player.GetItemCount ArmorCombat) Player.RemoveItem ArmorCombat PArmor Player.AddItem ArmorCombat PArmor Set PArmor to (Player.GetItemCount ArmorCombatBlack) Player.RemoveItem ArmorCombatBlack PArmor Player.AddItem ArmorCombatBlack PArmor and so on for all the armors and weapons in the game (I have had to spread this among multiple terminal entries due to space issues in the Item result script box in the GECK). The problem is that when I go ingame to test that it works it only repairs some items and not others despite the fact that I have verified that the script should be removing/adding the items as it does with some. Here is where I get really confused. After I find that an item is not repairing correctly; if I go into the GECK an attatch an exact copy of the part of the script dealing with the infringing items to another terminal option all of a sudden when I am ingame it will work fine. Any help on trying to fix this (so they all get repaired and not just some) would be appreciated, Antinovel Link to comment Share on other sites More sharing options...
tomm434 Posted June 26, 2014 Share Posted June 26, 2014 (edited) Why don't you do this: ref playerItemRef set playerItemRef to player.GetEquippedObject 2 playeritemref.setCurrenthealth 100 It will detect any armor that player is wearing.Then I think you can use setCurrentHealth commandI've never tried but this might work. http://www.gribbleshnibit.com/projects/NVSEDocs/#GetEquippedObjecthttp://www.gribbleshnibit.com/projects/NVSEDocs/#SetCurrentHealth ps. SetCurrentHealth works and you need to know exactly how much health you need for the item(each armor has its own maximum health value), try using "GetHealthPercentage" on item ref and then find out what maximum health is ( via simple mathematic). Edited June 26, 2014 by tomm434 Link to comment Share on other sites More sharing options...
Recommended Posts