Jump to content

Need Help Adding Night Vision to Chinese Stealth Armor


smjn

Recommended Posts

Issue resolved in post #2.

 

 

Trying to add Night Vision Power Armor 's NTPowerHelmetScript onto Chinese Stealth Armor so that when I turn on Pipboy Light on it turns on Night Vision rather than Pipboy Light, unfortunately I haven't gotten the results I'm looking for. Help is greatly appreciated.

 

This is the altered script:

 

Basically what I added was Player.GetEquipped DLC02ArmorStealthWasteland at the end of lines 21, 32, and 34.

Edited by smjn
Link to comment
Share on other sites

Figured out what went wrong, I overlooked NTAnchorPowerHelmetScript. Making the modification there I was able to add NightVision to the CSA.

 

Though the Nightvision isn't perfect (has a tendency of fluctuating between turning on Pipboy Light instead of Nightvision), it is a definite welcome addition to the CSA.

ScriptName NTAnchorPowerHelmetScript

short NTHasLight
short NTArmorEquipped

Begin OnUnequip Player
	rimod NTNightVision
	rimod NTVision
	Set NTPowerVision to 0
     Set NTArmorEquipped to 0

	If Player.HasMagicEffect PipLight ==1 && NTHasLight == 0
		Player.RemoveSpell PipBoyLight
		PlaySound UIPipBoyLightOff
	Endif
End

Begin OnEquip Player
	If Player.IsActor == 1 

     If Player.GetEquipped DLC02ArmorPowerT51bHelmet || Player.GetEquipped DLC02ArmorPowerT51bHelmetWasteland || Player.GetEquipped DLC02ArmorStealthWasteland
		set NTArmorEquipped to 1
	Endif 
     If NTHasLight == 0 && NTArmorEquipped == 1
			Set NTPowerVision to 1
		Endif
	Endif
End

Begin GameMode

     If NTArmorEquipped == 1 && (Player.GetEquipped DLC02ArmorPowerT51bHelmet == 0 || Player.GetEquipped DLC02ArmorPowerT51bHelmetWasteland == 0 || Player.GetEquipped DLC02ArmorStealthWasteland == 0)
		set NTArmorEquipped to 0
     Elseif NTArmorEquipped == 0 && (Player.GetEquipped DLC02ArmorPowerT51bHelmet || Player.GetEquipped DLC02ArmorPowerT51bHelmetWasteland || Player.GetEquipped DLC02ArmorStealthWasteland)
		set NTArmorEquipped to 1

	     If NTHasLight == 0
			Set NTPowerVision to 1
		Endif
	Endif 

	If Player.IsActor == 1 &&  NTArmorEquipped == 1

		If IsImageSpaceActive  NTVision == 0 &&  IsImageSpaceActive NTNightVision == 0
		;This is used instead of an OnEquip block to fix broken equipped causing ImageSpace effect when player attempts to wear it
			imod NTVision
		Endif

		If NTHasLight == 1 && Player.HasMagicEffect PipLight == 0 
			Set NTHasLight to 0
			Set NTPowerVision to 1
		Endif
		
		If NTPowerVision == 1
			If Player.HasMagicEffect PipLight == 1 &&  IsImageSpaceActive NTNightVision == 0 && NTHasLight == 0
				rimod NTVision
				imod NTNightVision
			Elseif Player.HasMagicEffect PipLight == 0 &&  IsImageSpaceActive NTNightVision == 1
				imod NTVision
				rimod NTNightVision
			Endif
		Endif
	Endif


	If Player.IsActor == 1 &&  NTArmorEquipped == 0 && MenuMode == 0
		If NTHasLight == 0 && Player.HasMagicEffect PipLight == 1
			Set NTHasLight to 1
		Elseif NTHasLight == 1 && Player.HasMagicEffect PipLight == 0
			Set NTHasLight to 0
		Endif
	Endif


End
Edited by smjn
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...