Actor property Player AutoState BusyEndStateEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked)GoToState("Busy")If IsWeapMagicEquipped() ;end BrawlEndIfGoToState("")EndEventBool Function IsWeapMagicEquipped()Int i = 1While i <= 9 If Player.GetEquippedItemType(0) == i || Player.GetEquippedItemType(1) == i Return True EndIf i += 1EndWhileReturn FalseEndFunction
Actor Property playerRef autoState BusyEndStateEvent OnHit(ObjectReference attacker, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)GoToState("Busy")if((attacker as actor) == playerRef) if(aksource as weapon) debug.notification("Player used a weapon!") elseif(aksource as spell) debug.notification("Player used a spell!") endifendifGoToState("")EndEvent
Actor property Player AutoState BusyEndStateEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked)GoToState("Busy")If IsWeapMagicEquipped() ;end BrawlEndIfGoToState("")EndEventBool Function IsWeapMagicEquipped()Int i = 1If Player.getEquipped Weapon() == True || Player.getEquippedWeapon(false) == True Return TrueElseIf Player.getEquippedSpell(0) == True || Player.getEquippedSpell(1) == True Return TrueElse Return FalseEndIfEndFunction
Weapon property Unarmed AutoState BusyEndStateEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \ bool abBashAttack, bool abHitBlocked)GoToState("Busy")If akSource != Unarmed ;end BrawlEndIfGoToState("")EndEvent