It goes like this: The player accepts the quest and the actor follows him. The player goes into the cave and then walks into a trigger box which enables stage 30 of the quest:
Scriptname STQActivatorScript extends ObjectReference Quest property quest01 auto Event onActivate(ObjectReference akActionRef)if(quest01.GetStage() == 20)quest01.SetStage(30)endifendevent
Stage 30 completes objective 20 and stops scene01(which is the scene that makes the actor follow the player) and starts scene2(which is where he betrays the player) and enables 2bandits to help him try and kill the player:
SetObjectiveCompleted(20)STQHuntScene01.Stop()STQHuntScene02.Start()Alias_Bandit1.GetReference().Enable()Alias_Bandit2.GetReference().Enable()
When scene 2 starts it removes the faction "DunPlayerAllyFaction" and adds the faction "BanditFaction" to the actor:
STQHunter.AddToFaction(BanditFaction)STQHunter.RemoveFromFaction(DunPlayerAllyFaction)
This is what I have tried:
What I tried at first is adding him to the faction "BanditFaction" through a papyrus script.
Then I tried making him aggressive which also didn't work. This also made him attack various things which ended up making the quest not work.
Then I tried adding him to the faction "DunPlayerAllyFaction" as default then removing said faction and then adding the bandit faction whilst keeping him in very aggressive mode.
And finally here is the file: http://filesmelt.com/dl/StreamQuest.rar
(Just find the interior cell called BleakRockCave. The actor is right outside the cave.)