Scripting Questions About Detecting When Player Attacks

Post » Thu Jun 21, 2012 4:04 am

Hey,

I just started Creation Kit and Papyrus scripting, and currently, I want to detect when the player begins attacking (I want to detect every swing of the weapon). What I have currently is a Spell Ability with an Magic Effect attached with an IsAttacking condition, but it does not tell me when the player swings his/her weapon again. What I want is for every time the player swings his/her weapon, the player automatically takes a step forward.

Your help is much appreciated!
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Thu Jun 21, 2012 4:50 am

Event OnEffectStart(Actor akTarget, Actor akCaster)    RegisterForAnimationEvent(akTarget, BashStart)    RegisterForAnimationEvent(akTarget, BowRelease)    RegisterForAnimationEvent(akTarget, WeaponLeftSwing)    RegisterForAnimationEvent(akTarget, WeaponSwing)EndEvent
User avatar
Jerry Cox
 
Posts: 3409
Joined: Wed Oct 10, 2007 1:21 pm

Post » Wed Jun 20, 2012 5:50 pm

Thank you very much! Worked wonderfully and as desired.
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm


Return to V - Skyrim