Jump to content

[LE] Follower Horse Riding implementation - follower will not stay mounted


Sanitatem

Recommended Posts

Hi all,

 

I am trying to get my follower Moranya to ride a horse that teleport to her when the player rides a horse. I have set up a horse riding quest, and placed a script on the player alias. I adapted the script from a smiliar topic I found on the nexus forums. My follower has a horse riding package with min radius set to 300, max radius set to 1000, ride horses if possible set to yes. My horse, Sirora, has Moranya registered as its owner.

 

At the moment the Moranya is able to get on the horss, but the second my player moves forward (on his horse) she will dismount and run after him. If I stay put after mounting the horse, she will stay mounted and will only dismount when I do. Please help!

 

Script is below:

 

 

 

Scriptname MR01MountTest extends ReferenceAlias

Faction Property CurrentFollowerFaction Auto

Actor Property Siroria Auto

Actor Property Moranya Auto

 

Actor Player

ReferenceAlias Property MoranyaRef Auto

Event OnInit()

Player = Game.GetPlayer()

RegisterForAnimationEvent(Game.GetPlayer(), "tailHorseMount")

RegisterForAnimationEvent (Game.GetPlayer(), "tailHorseDismount")

Debug.Notification ("Events registered")

EndEvent

 

Event OnAnimationEvent (ObjectReference akSource, string asEventName)

If akSource == Player

Else

Return

EndIf

 

If Moranya.IsInFaction(CurrentFollowerFaction) ==1

If Moranya.GetActorValue("WaitingForPlayer") == 0

 

If asEventName == "tailHorseMount"

Debug.Notification ("Player mounted")

Siroria.MoveTo(Moranya as objectreference, 50.0000 \* math.sin(Moranya.GetAngleZ() + 90.0000), 50.0000 \* math.cos(Moranya.GetAngleZ() + 90.0000), 0.000000, true)

Moranya.OnAnimationEvent(none, "tailHorseMount")

Siroria.Activate(Moranya)

Moranya.EvaluatePackage()

EndIf

 

 

 

If asEventName == "tailHorseDismount"

Debug.Notification ("Player dismounted")

Moranya.Dismount()

Moranya.EvaluatePackage()

EndIf

Else

 

Return

EndIf

EndIf

EndEvent

Edited by Sanitatem
Link to comment
Share on other sites

  • Recently Browsing   0 members

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