Difference between revisions of "Talk:IsSneaking - Actor"
Jump to navigation
Jump to search
no edit summary
imported>Cipscis m (Clarified "one" -> "1") |
imported>MaboroshiDaikon |
||
Line 43: | Line 43: | ||
: -- [[User:Cipscis|Cipscis]] 23:11, 10 February 2012 (EST) | : -- [[User:Cipscis|Cipscis]] 23:11, 10 February 2012 (EST) | ||
:I was originally using just as you did, but when that didn't work, I switched to the comparison with 1. I'm wondering if this is an issue with the ReferenceAlias type script instead of the command itself. Here's the complete code I'm having issues with: | |||
<source lang="papyrus">Scriptname PlayerHorseScript extends ReferenceAlias | |||
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 (akActionRef == Game.GetPlayer()) | |||
If Game.GetPlayer().IsSneaking() | |||
Debug.MessageBox("Sneak Activate Horse!!") | |||
HorseChest.Activate(Game.GetPlayer(), true) | |||
Else | |||
Debug.MessageBox("Normal Activate Horse!! " + HorseChest) | |||
;HorseChest.Activate(Game.GetPlayer(), true) | |||
EndIf | |||
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> | |||
Replacing IsSneaking() with IsWeaponDrawn() works. |