Jump to content

Help with Companions BuildRef


Recommended Posts

I keep getting crashing of my main script in SCR when I enable companions, something in the references sems to not be right, are ther 2 different references for actors?

I got the ID's from FNVEdit off the NPC's in their plugins, I dropped the first 2 digits off and it seems to start ok giving me a Message that says "SCR1Main: Willow Added 95, Willow" but then crashes later just after "Willow1" when I try use that reference to check if they are engaged in sex before running stuff. I have the same problem with Kirina

 

		if (IsModLoaded "NVWillow.esp")
		Set iHasWillow to GetModIndex "NVWillow.esp"
		Set SexoutSQVAR.iHasWillow to iHasWillow
		Set rZWillow to BuildRef iHasWillow 2781
		Set SexoutSQVAR.rZWillowREF to rZWillow
		DebugPrint "SCR1Main: Willow Added %6.0f, %n" iHasWillow rZWillow
	else
		Set iHasWillow to 0
		Set SexoutSQVAR.iHasWillow to 0
		Set rZWillow to 0
		Set SexoutSQVAR.rZWillowREF to 0
	endif

; *** ZWillow
		if iHasWillow != 0
		DebugPrint "Willow1"
			if rZWillow.GetItemCount 00SexoutActor == 0
		DebugPrint "Willow2"
				StartQuest SexoutSTimedEffectsZWillow
				DebugPrint "Willow Effects Called"
			endif
;				Set SexoutSQVARZWillow.fDistanceToPlayer to rZPlayer.GetDistance rZWillow
		endif

Link to comment

I keep getting crashing of my main script in SCR when I enable companions' date=' something in the references sems to not be right, are ther 2 different references for actors?

I got the ID's from FNVEdit off the NPC's in their plugins, I dropped the first 2 digits off and it seems to start ok giving me a Message that says "SCR1Main: Willow Added 95, Willow" but then crashes later just after "Willow1" when I try use that reference to check if they are engaged in sex before running stuff. I have the same problem with Kirina

 

		if (IsModLoaded "NVWillow.esp")
		Set iHasWillow to GetModIndex "NVWillow.esp"
		Set SexoutSQVAR.iHasWillow to iHasWillow
		Set rZWillow to BuildRef iHasWillow 2781
		Set SexoutSQVAR.rZWillowREF to rZWillow
		DebugPrint "SCR1Main: Willow Added %6.0f, %n" iHasWillow rZWillow
	else
		Set iHasWillow to 0
		Set SexoutSQVAR.iHasWillow to 0
		Set rZWillow to 0
		Set SexoutSQVAR.rZWillowREF to 0
	endif

; *** ZWillow
		if iHasWillow != 0
		DebugPrint "Willow1"
			if rZWillow.GetItemCount 00SexoutActor == 0
		DebugPrint "Willow2"
				StartQuest SexoutSTimedEffectsZWillow
				DebugPrint "Willow Effects Called"
			endif
;				Set SexoutSQVARZWillow.fDistanceToPlayer to rZPlayer.GetDistance rZWillow
		endif

[/quote']

You are using willow NPC id xx000ADD, not the reference in the game world: xx007E61 = 32353

Link to comment
You are using willow NPC id xx000ADD' date=' not the reference in the game world: xx007E61 = 32353[/quote']Ahh, thanks heaps, I couldn't find any documemtation on REFs in NVSE to find that, I was hoping it was something dumb like that, where would I find the reference number for Kirina or any other NPC in GECK or FNVEdit?

 

I've just searched through Kirina.esm in GECK and can't find 007E61 in there.

 

DOH! It might help if I looked for that number in the Willow.esm :)

 

Ah found it, had to go into the game window thingy :)

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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