Difference between revisions of "Talk:IsSneaking - Actor"

Jump to navigation Jump to search
453 bytes removed ,  11:25, 11 February 2012
no edit summary
imported>MaboroshiDaikon
imported>MaboroshiDaikon
Line 90: Line 90:
Replacing IsSneaking() with IsWeaponDrawn() works.
Replacing IsSneaking() with IsWeaponDrawn() works.


:UPDATE- In case things weren't weird enough... this works just fine:
:UPDATE- In case things weren't weird enough... this works just fine: EDIT- NOT!


<source lang="papyrus">Scriptname PlayerHorseScript extends ReferenceAlias   
<source lang="papyrus">Scriptname PlayerHorseScript extends ReferenceAlias   


bool IsPlayerSneaking
bool IsPlayerSneaking
Event OnDeath(Actor akKiller)
MySelf = GetActorReference()
EndEvent
Event OnUnload()
If MySelf.IsDead() == 1
; disable the dead horse if it is unloaded
MySelf.Disable()
MySelf.Delete()
; added a new horse that can be bought at the stables
Myself = StablesPosition.PlaceActorAtMe(LvlHorseSaddled)
Alias_HorseRef.ForceRefTo(MySelf)
Alias_HorseRef.GetRef().SetFactionOwner(StablesFaction)
EndIf
EndEvent


Event OnActivate(ObjectReference akActionRef)
Event OnActivate(ObjectReference akActionRef)
Line 128: Line 112:
EndIf
EndIf
EndEvent
EndEvent</source>
 
 
 
Actor Property MySelf  Auto 
 
ObjectReference Property StablesPosition  Auto 
 
ActorBase Property LvlHorseSaddled  Auto 
 
ReferenceAlias Property Alias_HorseRef  Auto 
 
Faction Property StablesFaction  Auto 


ObjectReference Property HorseChest Auto</source>
Okay, if you activate the horse just as the player's feet touch the ground (and the player had been sneaking when mounting previously), it will work.  Wait a second and no dice.  Not sure what's going on here...

Navigation menu