TheNexxusOne Posted November 26, 2010 Share Posted November 26, 2010 I am trying to add a feature to a mod that de-equips armor items as soon as the armor hits 0 HP. I am guessing that I will need to use some variation of a script with the "GetEquippedCurrentHealth <= 0" function combined with the opposite of the "Player.EquipItem" function. If anyone could assist me with this bit of scripting, I would be greatly appreciative! I will definitely give credit as well when I post the mod for download. Thank you! Link to comment Share on other sites More sharing options...
TallgeeseIV Posted November 26, 2010 Share Posted November 26, 2010 I just wrote this script a few minutes ago, it's pretty similar to what you're doing. i tested it and it works with no issues, it does require NVSE, though i'm sure you knew that. int ToggleNuke Begin GameMode If player.GetEquipped SamPowerArmorDam == 1 && ToggleNuke != 1 If player.GetEquippedCurrentHealth 2 <= 0 set ToggleNuke to 1 player.KillActor player 0 0 player.PlaceAtMe FatManNukeExplosion EndIf EndIf End i think if you rewrote it this way: int ToggleNoHP Begin GameMode If player.GetEquipped YourRefHere == 1 && ToggleNoHP != 1 If player.GetEquippedCurrentHealth 2 <= 0 set ToggleNoHP to 1 player.UnEquipItem YourRefHere 0 0 EndIf EndIf End probably not the most efficient way to do it but it's what i'd do. Link to comment Share on other sites More sharing options...
TheNexxusOne Posted November 26, 2010 Author Share Posted November 26, 2010 Thank you for the reply! I have not installed NVSE yet because I have not needed it so far with my modding. I downloaded NVSE Beta5 just now and tried to get it to work, but it returns a "Couldn't retrieve EXE version information." error when I try to execute nvse_loader -editor. I am running the latest version of FNV (v1.2.0.285) and the GECK (v1.1), so I do not know what the problem is. Any thoughts on if this can be made to work without NVSE? Link to comment Share on other sites More sharing options...
TallgeeseIV Posted November 26, 2010 Share Posted November 26, 2010 Well, that sucks. No idea, i don't think it can, i haven't found any other way to get a piece of armor's health value... Link to comment Share on other sites More sharing options...
Recommended Posts