Jump to content

Follower script doesn't work


Anbeegod

Recommended Posts

Posted

I've copied the content of a follower script (except the first strata) and used it to create a new script.

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__0302E7A7 Extends TopicInfo Hidden
 
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
(pDialogueFollower as DialogueFollowerScript).SetFollower(akspeaker)
;END CODE
EndFunction
;END FRAGMENT
 
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
 
Quest Property pDialogueFollower  Auto  
 
 
 
I've filled the property myself (DialogueFollower). This script was supposed to make an NPC follow the player following a certain dialogue.
However, when I tested the dialogue in the game, the follower options (wait, trade) indeed appeared, but the NPC didn't actually follow me, and wouldn't so even if I fast travel.
Posted

ReferenceAlias Property Follower Auto <--- Set this with the "Follower" Alias inside the DialogueFollower Quest

 

and add to your line inside the fragment:

 

Follower.forceRefTo(akSpeaker)

Posted

Didn't work :o

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname TIF__0302ED0E Extends TopicInfo Hidden
 
;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
(pDialogueFollower as DialogueFollowerScript).SetFollower(akspeaker)
Follower.forceRefTo(akSpeaker)
;END CODE
EndFunction
;END FRAGMENT
 
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT
 
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
 
Quest Property pDialogueFollower  Auto  
 
ReferenceAlias Property Follower  Auto  
 
 
 
In case you don't know, this dialogue is in another quest. Don't know if it has any effect.
Posted

If the dialogue is in another quest, then probably the two setting you do are not triggering the lines you want.

 

Open the quest that is providing the lines, and check how the dialogue line is filtered.

And be sure to set all you need for your akSpeaker to respect the conditions.

 

For example CurrentFollowerFaction and PotentialFollowerFaction should be associated with the actor.

Posted

Sorry, not this one.

The dialogue line that should be available for the follower but is not happening. (Should be a vanilla one.)

Posted

No. Give me one moment to open the CK.

 

I will check what is missing for the NPC to actually follow the player.

Posted

OK, the "Following Package" is called "PlayerFollowerPackage".

And this package is associated with the alias "Follower" inside the quest DialogueFollower.

 

The package has 2 procedures:

1) Follow

2) Wait and travel

 

The procedure that is executed depends on the value associated to the actor "WaitingForPlayer"

 

 

At this point replace the lines of code you did with something like:

 

...

DialogueFollower.SetFollower(akSpeaker)

akSpeaker.SetAV("WaitingForplayer", 0)

...
 
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
 
 
DialogueFollowerScript Property DialogueFollower Auto
 
Posted

Doesn't work. I guess I should use the old way. Still, thank you for your help.

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname TIF__0302ED0E Extends TopicInfo Hidden
 
;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
DialogueFollower.SetFollower(akSpeaker)
akSpeaker.SetAV("WaitingForplayer", 0)
;END CODE
EndFunction
;END FRAGMENT
 
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
;
;END CODE
EndFunction
;END FRAGMENT
 
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
 
Quest Property pDialogueFollower  Auto  
 
ReferenceAlias Property Follower  Auto  
 
DialogueFollowerScript Property DialogueFollower Auto
 
Posted

Last point (sorry but it is like "Did you attached the plug?"):

 

Are the properties in your script correctly filled with the values?

Archived

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

  • Recently Browsing   0 members

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