4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
578 B

Scriptname _00E_EquipControl Hidden
bool function SheatheWeapon(Actor actorRef = None, bool bWaitForAnimation = true) global
if actorRef == None
actorRef = Game.GetForm(0x14) as Actor
endif
if ! actorRef.IsWeaponDrawn()
return false
endif
if SKSE.GetVersion()
actorRef.SheatheWeapon()
else
Debug.SendAnimationEvent(actorRef, "Unequip")
endif
if ! bWaitForAnimation
return true
endif
int i = 0
while i < 25 && actorRef.GetAnimationVariableBool("IsUnequipping")
Utility.Wait(0.1)
i += 1
endwhile
Utility.Wait(0.1)
return true
endfunction