Need some helpadvice on Horse Whisperer Mod

Post » Wed Jun 20, 2012 5:34 pm

So,

I'm trying to implement a similar mod to my old Oblivion "Horse Whisperer". Essentially I want to the player to be able to steal horses, take them some distance away, and "train" the horses to be theirs. I can do this, but I really want to add some conditional checks which are.... challenging me. For starters, IsPlayersLastRiddenHorse and GetPlayersLastRiddenHorse seem to be bugged, or at least have some undocumented nuances. Here's two different iterations of part of my script, that both fail:

if akTarget == Game.GetPlayersLastRiddenHorse()   Trace("This is the players last ridden horse")   ; Do stuffelse   Trace("This is NOT the players last ridden horse")endif

Also

if akTarget.IsPlayersLastRiddenHorse()   Trace("This is the players last ridden horse")   ; Do Stuffelse   Trace("This is NOT the players last ridden horse")endif


This is a scripted magic effect and in order to work, I want the player to have at least ridden the horse. So... I steal the horse from a stable, ride off a bit. Jump off, and cast the spell at the horse, and each time I trace out "This is NOT the players last ridden horse". I've also added a debug statement like the following:

Trace("Player's last ridden horse is " + Game.GetPlayersLastRiddenHorse())


And this logs "Player's last ridden horse is NONE"

It doesn't seem like the game keeps track of the horse if the horse is stolen perhaps?

So, baring that I decided, I'll let the player attempt to whisper to the horse, but I'll alert the owner if they are around. Easy? No.... apparently GetActorOwner only returns an ActorBase, and I can't figure out how to get the Actor from the ActorBase because you can't cast an ActorBase to an Actor. Basically I want to send out a steal alarm but only if the owning actor sees the player. Alternatively, I've opted to just trigger a steal alarm anyway until I can figure out an alternative. Any help on getting the players last ridden horse would be much appreciated!

-MM
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am

Return to V - Skyrim