Jump to content

Is there a way for companions to use Water breathing ?


Agnot2006

Recommended Posts

You can try editing the VMS15RebreatherScript script on the mask so that it is not player specific.

 

scn VMS15RebreatherScript

int iEquipped
ref rActorREF

begin OnEquip
set rActorREF to GetContainer
rActorREF.AddSpell VMS15WaterBreathingActual
set iEquipped to 1
end

begin GameMode
if iEquipped == 1 && rActorREF.GetEquipped VMS15Rebreather == 0
	rActorREF.RemoveSpell VMS15WaterBreathingActual
	set iEquipped to 0
endif
end

Link to comment
Share on other sites

Thank You I made a minor change so I didn’t duplicate the quest object.

So now I can give my companion my new Rebreather or the Quest one it doesn’t matter and your script works like a dream. My companion didn’t like it at first until she realized she was breathing now she loves it

Please take a kudos

 

scn VMS15RebreatherScript

int iEquipped 
ref rActorREF 

begin OnEquip 
       set rActorREF to GetContainer 
       rActorREF.AddSpell VMS15WaterBreathingActual 
       set iEquipped to 1 
end 

begin GameMode 
       if iEquipped == 1 && rActorREF.GetEquipped VMS15Rebreather == 0 && rActorREF.GetEquipped VMS15Rebreather2 == 0
               rActorREF.RemoveSpell VMS15WaterBreathingActual 
               set iEquipped to 0 
       endif 
end

Edit:

I took my companion for a swim in Lake Mead but she wouldn’t leave the surface. Back on land in consol I did a Getav waterbreathing which came back zero. I did a Setav waterbreathing 1 then another Getav waterbreathing and it came back 1 so its not giving her waterbreathing but She is essential so maybe that’s why she was ok through the Vault 3 water.

But it works for the Player?

Maybe its hard coded to not apply to NPCs?

Edit2:

In consol Setav waterbreathing 1 does work and she doesn’t try to reach the surface all the time but stays with me. So its the script thats only applied to the player.

Is there a way to setav waterbreathing 1 and setav waterbreathing 0 in a new script so I make a companion or NPC only Rebreather mask

Link to comment
Share on other sites

Yeah, sometimes spells don't 'stick' to NPCs. So make a copy of the Rebreather (CompanionRebreather) and try this script on it:

 

scn CompanionRebreatherScript

int iEquipped 
ref rActorREF 

begin OnEquip 
   	set rActorREF to GetContainer 
   	rActorREF.SetAV WaterBreathing 1
   	set iEquipped to 1 
end 

begin GameMode 
   	if iEquipped == 1 && rActorREF.GetEquipped CompanionRebreather == 0
           	rActorREF.SetAV WaterBreathing 0
           	set iEquipped to 0 
   	endif 
end

Link to comment
Share on other sites

I'm fairly certain regardless of what mode you're playing in, companions and NPCs can't drown ever. also there's one time that the need to hold one's breath ever comes up in game. So you might be better off just making them wait on sure than going through all these complicated steps. Edited by formalrevya
Link to comment
Share on other sites

Its not much of a companion if you have to leave them behind. Its all down to Immersion.

 

Rickerhk,

I'm afraid it still doesn't work. When I do getav waterbreathing in consol it comes back with zero

But I can setav waterbreathing 1 and getav sees it as 1

The only difference to your script is I already had created the companion version Mask as VMS15Rebreather2, do you think that would affect it?

I even removed the water breathing object effect just in case it was toggling and its not necessary anyway.

Link to comment
Share on other sites

This is the only way I could get the mask to work right with an NPC follower:

1. Copy the rebreather to a new object

2. Untick the quest item flag

3. Remove the object effect

4. Add this script to the mask:

 

scn CompanionRebreatherScript

int iEquipped
int iStatSet
ref rActorREF 


begin GameMode 


if (rActorREF)
	if (rActorREF.GetEquipped CompanionRebreather == 1)
		set iEquipped to 1
	else
		set iEquipped to 0
	endif
else
	set iEquipped to 0
endif


if (iEquipped == 1)
	
	if (iStatSet == 0)
		if (rActorREF)
			rActorREF.SetAV WaterBreathing 1
			set iStatSet to 1
		endif
	endif
			
else
			
	if (iStatSet == 1)
		if (rActorREF)
			rActorREF.SetAV WaterBreathing 0
			set iStatSet to 0
		endif
	else
		set rActorREF to GetContainer
	endif
	
endif


end

 

 

 

The 'OnEquip' block would not fire on the NPC. Maybe because of the slot used by the mask. This script works even when you take the mask away - it resets the stat on the NPC.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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