Difference between revisions of "Talk:IsSneaking - Actor"

Jump to navigation Jump to search
1,294 bytes added ,  10:12, 11 February 2012
no edit summary
imported>MaboroshiDaikon
imported>MaboroshiDaikon
Line 89: Line 89:


Replacing IsSneaking() with IsWeaponDrawn() works.
Replacing IsSneaking() with IsWeaponDrawn() works.
:UPDATE- In case things weren't weird enough... this works just fine:
<source lang="papyrus">Scriptname PlayerHorseScript extends ReferenceAlias 
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)
If Game.GetPlayer().IsSneaking()
IsPlayerSneaking = true
Else
IsPlayerSneaking = false
EndIf
If (akActionRef == Game.GetPlayer() && IsPlayerSneaking)
Debug.MessageBox("Sneak Activate Horse!!")
HorseChest.Activate(Game.GetPlayer(), true)
Else
Debug.MessageBox("Normal Activate Horse!! " + HorseChest)
;HorseChest.Activate(Game.GetPlayer(), true)
EndIf
EndEvent
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>

Navigation menu