Jump to content

Follower script doesn't work


Anbeegod

Recommended Posts

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.
Link to comment

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)

Link to comment

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.
Link to comment

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.

Link to comment

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
 
Link to comment

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
 
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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use