Jump to content

Need help with a script for a custom companion


BlueBeard1983

Recommended Posts

Ok, I was wondering if anyone could help me with creating a script for a custom companion I'm working on. What I want is on the companions death, they are moved to another cell, resurrected, and after 2 game days, is teleported to the player and automatically rehired.

Link to comment
Share on other sites

Add the following segment to your quest script:

short	bResurrect
float	fResurrectDelay
; Add the above with the rest of the variables of your script.

begin	GameMode

	if bResurrect
		if (GameDaysPassed - fResurrectDelay) >= 2
			set bResurrect to 0
			CompanionRef.Enable
			CompanionRef.ResurrectActor 1
			CompanionRef.MoveTo player
			CompanionRef.SetPlayerTeammate 1
		endif
	elseif CompanionRef.GetDead
		set bResurrect to 1
		CompanionRef.Disable
		set fResurrectDelay to GameDaysPassed
	endif

end

Replace CompanionRef with your companion's unique Reference ID.

You should also set the companion to be a Quest Item.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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