[Help Needed] Initiate Riding as a Dialogue Option

Post » Sat Jul 26, 2014 6:59 am

Hi, and thanks so much for looking.

I make Tanback, a Sabrecat follower with custom sounds and subtitled dialogue. He has full follower functionality, but I also want him to be a mount.

He can be found on the Nexus and Steam Workshops, but I can't put links in my posts just yet.

I'm a 3D modeller and 2D artist primarily; my experience with scripting is basically next to nothing, but I'm trying really hard to learn by poring over resources and looking at others' code.

What I Want to Make Happen:

  • A dialogue option that allows the player to climb up on Tanback.
  • For the player to dismount upon pressing the Activate button, as is normal procedure for dismounting a horse.
  • For the rest of Tanback's dialogue functions to be left as they are.

What I have Done Already:

  • Tanback has a custom skeleton with a saddle bone in place.
  • Added the actortypehorse keyword to the actor in the CK.

What Happens Right Now:

  • Tanback moves correctly and all animations function as normal.
  • His 'Talk to Tanback' activator prompt has changed to 'Ride Tanback.'
  • If activated, the player performs the climbing up animation, but ends up several feet to the right of Tanback's model.
  • His dialogue tree comes up.
  • Cancelling out of it successfully transfers control to Tanback and he can be moved around.
  • The player however, remains hanging in place.
  • Pressing the Activate button dismounts and his AI returns to normal, however the player hasn't moved from the start position.

Right now the plan is to remove the 'ActorTypeHorse' keyword from Tanback, but keep his modified skeleton and (with help!) see if I can write a script to trigger the riding animation and things. I have researched a bit about some things I can make a script check for, but as I said I have barely any idea what I'm doing and I really need some help. I haven't bothered to even try to compile this yet because I know it's a trainwreck:

Scriptname TanBackRiderScript extends ObjectReference     TanBackDialogueGeneric Property TanBackDialogueGeneric Auto;Actor property horse auto auto state Waitingevent onActivate(objectReference AkActivator);if player is not riding an animal, make them rideIf Player.IsOnMount.GetValueInt() == 0AkActivator.SetIsRiding() == 1EndIFendEvent Event OnUpdate()counter += 1if KeyPressed = Input.IsKeyPressed(ActivateKey)KeyPressed = !KeyPressedif KeyPressed ; Make Player dismount.bool dismountInitiated = Player.Dismount()endifEndEventendState state doneendstate
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

Return to V - Skyrim