Jump to content

Actor.MoveTo() Won't move a horse


Recommended Posts

 

Have you looked in the Papyrus log for errors?

The Papyrus Log? The packages on the horse are creating the problem.

 

So disable the horse's AI before moving it into the storage cell.

Link to comment
Share on other sites

Don't worry about it. This guy has abandoned his thread. However, I do not think that would be the way to go. I would try to find a different way of doing what he wants to do, one without the world space and required the lease amount of modification to the game as possible.

Link to comment
Share on other sites

 

I happen to have some slight interest in this also and am unable to do any testing with horses at this time.

 

If you are still working on this project place this script on the player or a player alias and see if these two events work.

Event OnCellAttach()
  RegisterForAnimationEvent(Game.GetPlayer(), "HorseEnter") 
  RegisterForAnimationEvent(Game.GetPlayer(), "HorseExit") 
  Debug.Notification("Events have been registered.")
endEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)

  If (akSource == Game.GetPlayer()) 
  Else 
    Return
  EndIf
  
  If (asEventName == "HorseEnter")
    Debug.Notification("Player got on Horse.")
    Return
  EndIf

  If (asEventName == "HorseExit")
    Debug.Notification("Player got off Horse.")
    Return
  EndIf

EndEvent

Your not using the right event name strings try:

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

Works for me...

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

 

Your not using the right event name strings try:

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

Works for me...

 

 

I have not had a chance to test either one of them. Much appreciated. You would not happen to know when the game fills the players last ridden horse property? You would think it was when the player got on the horse as opposed to got off.

Link to comment
Share on other sites

Not sure at all, but it would be pretty easy to check, just add checks in the animation events to see.

 

your code regurgitated

Scriptname SomeScript Extends Quest

Actor Player

Event OnInit()
    Player = Game.GetPlayer()
    RegisterForAnimationEvent(Player, "tailHorseMount")
    RegisterForAnimationEvent(Player, "tailHorseDismount")
EndEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    If akSource == Player
        If asEventName == "tailHorseMount"
            Debug.Notification("Player Mount Horse.")
            ;Do check here
        ElseIf asEventName == "tailHorseDismount"
            Debug.Notification("Player Dismount Horse.")
            ;Do check here
        EndIf
    EndIf
EndEvent
Link to comment
Share on other sites

 

Not sure at all, but it would be pretty easy to check, just add checks in the animation events to see.

 

your code regurgitated

Scriptname SomeScript Extends Quest

Actor Player

Event OnInit()
    Player = Game.GetPlayer()
    RegisterForAnimationEvent(Player, "tailHorseMount")
    RegisterForAnimationEvent(Player, "tailHorseDismount")
EndEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    If akSource == Player
        If asEventName == "tailHorseMount"
            Debug.Notification("Player Mount Horse.")
            ;Do check here
        ElseIf asEventName == "tailHorseDismount"
            Debug.Notification("Player Dismount Horse.")
            ;Do check here
        EndIf
    EndIf
EndEvent

 

No, I think my code is just fine. I learned those techniques and several others from a programmer. Take a minute to look at it and see if you can figure out why it is done that way. What are the benefits? How could it be useful in other situations on other scripts?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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