Jump to content

Struggling with Implementing Follower Horse Mounting Feature

Recommended Posts

On 5/17/2024 at 6:57 PM, scorrp10 said:

Basically, my thought would be to have a perma-running quest where both player and Henry are aliases.   You likely already have one for the dialogue.   Henry alias  would have a stack of packages, with horse riding one being a higher priority, but having a condition that player is also mounted.    However, you also need some sort of script attached to player that will detect when player mounts/dismounts and will call  TryToEvaluatePackage()  on Henry alias.

; Global
Bool PlayerIsRiding
ReferenceAlias Property HenryAlias Auto
Actor Property PlayerRef Auto

; somewhere at game load 
	RegisterForAnimationEvent(PlayerRef, "MTState")
	PlayerIsRiding = PlayerRef.GetAnimationVariableBool("bIsRiding")

Event OnAnimationEvent(ObjectReference akSource, String asEventName)
	If(akSource == PlayerRef && asEventName == "MTState")
		Bool NewPlayerIsRiding = PlayerRef.GetAnimationVariableBool("bIsRiding")
		If(NewPlayerIsRiding != PlayerIsRiding)
				; Teleport horse to Henry
			PlayerIsRiding = NewPlayerIsRiding


Just used this code to set-up a quest for the Interesting NPC follower Among The Hist and it worked perfect. Finally got that damn lizard riding a horse. Great answer. I use Follower Live Package and Among-The-Hist was my 2nd follower (didn't plan to have a 2nd follower but I couldn't say no to the lizard) so I thought maybe he was bugged or something since I didn't have AFT or similar mod installed. But this essentially solved the one thing that was bugged about him.

The one thing I don't understand is why the animation event "MTState" works for this. Not complaining but on this page it mentioned something about when the player was exiting water triggers this event. Oh well, I guess this documentation is not 100% accurate as it worked fine for player mounting. Animation Events - the CreationKit Wiki (uesp.net)

By the way, there is no need to teleport the horse as your follower will walk to the horse no problem. (more immersive ;P)



Link to comment
Share on other sites

  • Recently Browsing   0 members

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