Unable to determine if player is riding a horse (mounted or

Post » Mon Jun 18, 2012 3:20 pm

Hey all! I'm working on my "Conjure Ethereal Horse" mod (you'll have to search on Nexus or Steam if you want to take a look, since I apparently don't have permission to post links).

Thus far, the only event that I've discovered that fires when mounting/dismounting a horse is the ObjectReference's OnActivate() event. I've painstakingly output every other Actor/ObjectReference event/property/etc that I could to the trace log, and NOTHING else seems to trigger or change when mounting or dismounting.

The problem with the OnActivate event is that it fires when the player mounts, dismounts, or even when they are prevented from dismounting because there is an obstruction (i.e. when you can't get off your horse). So there's no real way I can determine if the player is actually on the horse or not if they type "E" and get obstructed from dismounting.

My end goal is to simply make my horse "disappear/disable/delete" when the player dismounts. My original attempt was to call Self.Disable() on the horse after the second OnActivate event fired (assuming that the first was the player getting on the horse). That didn't work when the player was obstructed and prevented from dismounting - the horse would disable, vanish, and leave the player stuck, spread-eagle five feet off the ground.

My temporary solution is to wait for 3 seconds (presumably while the player dismounts), and then murder the horse. This prevents the player from getting stuck if they can't dismount, however, the end result is a very ungraceful plummet to the floor.

Has anyone found any other events or properties that can be referenced to determine if the player is mounted, or riding, or spread-eagle five feet off the ground?


EDIT:

Ok, to be fair, I searched this site for mount/dismount/riding/rideable/on horse/etc and I finally clicked my own "mount" tag I added at the top of this post and came across Imp of the Perverse's post about this same topic. I'd post a link, but apparently I'm not allowed to add links on this site since I'm so untrustworthy.
User avatar
Shiarra Curtis
 
Posts: 3393
Joined: Thu Jan 04, 2007 3:22 pm

Post » Mon Jun 18, 2012 7:42 pm

Not really. I did the same thing by setting a "bIsHorseMounted" Property to false/true when mounting/dismounting.... but that is flawed if the mod is enabled while already mounted on a horse.....

so im curious myself..... ?????
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am


Return to V - Skyrim