Gordyne Posted August 18, 2017 Share Posted August 18, 2017 (edited) How can I make this script work to reduce weapon degradation when using SMG?I hooked it up on a quest and made a perk set the quest stage, and tested it with a 9mm SMG, but it still degrades. scn ReduceWeaponDegradation ref ObjRef Begin GameMode set ObjRef to Player.GetEquippedObject 5 // 5 is the weaponif ObjRef.IsInList SMG // I made a new form list and added all smgs to it con_SetGameSetting fDamageToWeaponValue 0else con_SetGameSetting fDamageToWeaponValue 0.4EndifEnd The values 0 and 0.4 are unbalanced but it's just to see if it's working. Edited August 18, 2017 by Gordyne Link to comment Share on other sites More sharing options...
Gordyne Posted August 19, 2017 Author Share Posted August 19, 2017 (edited) I did a bit more testing and added ShowMessage Success(custom message): scn ReduceWeaponDegradation ref ObjRef Begin GameMode ShowMessage Success set ObjRef to Player.GetEquippedObject 5 // 5 is the weaponif ObjRef.IsInList SMG // I made a new form list and added all smgs to it con_SetGameSetting fDamageToWeaponValue 0else con_SetGameSetting fDamageToWeaponValue 0.4EndifEnd When I take the perk I get the message but only once, which means the script only runs once? EDIT: Managed to get it working. I was using a FOSE function(GetEquippedObject) that isn't available for NVSE.There is no need to set a ref, just change the condition to:if Player.GetEquipped.IsInList SMG == 1 Edited August 19, 2017 by Gordyne Link to comment Share on other sites More sharing options...
Recommended Posts