OnAnimationEvent

Post » Tue Nov 20, 2012 3:55 pm

Several good reasons for this thread:

Where can one find a list of all acceptable input animations? http://www.creationkit.com/RegisterForAnimationEvent_-_Form seems to suggest that not every Animation can be registered, soooooo how do we diagnose bad code etc?

More specifically to me, another user requested an automated POV switching mod that would automatically switch the player POV upon drawing/sheathing their weapon(s). I took the project on board and this is what I've got so far:


An ability is added to the player via Start Game Enabled Quest (no issues there).

This ability is a constant effect scripted Magic Effect (delivery = self) with the following script:


Spoiler

Scriptname APSBestowAbilityEffectScript extends activemagiceffect{Tracks IsWeaponDrawn on Player for automated POV switching.};DRAWN   = 1st Person;SHEATHED  = 3rd PersonActor Property PlayerRef Auto			   ;game.getplayer too expensive for update events. Property ~1000x fasterFunction RegisterFunction()  RegisterForAnimationEvent(PlayerRef, "ActionDraw")  RegisterForAnimationEvent(PlayerRef, "ActionSheath")EndFunctionEvent OnAnimationEvent(ObjectReference akSource, string asEventName)   If asEventName == "ActionDraw"			 ;we got the DRAW animation event	 Game.ForceFirstPerson()	  Debug.Notification("Forced 1st Person")   endif	  If asEventName == "ActionSheath"		   ;we got the SHEATH animation event	   Game.ForceThirdPerson()		Debug.Notification("Forced 3rd Person")	  endifEndEvent


Not much seems to be working at this point. None of my notifications are getting printed so I'm at a loss. Anything glaringly obvious....???
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Tue Nov 20, 2012 6:14 am

You're in luck, I just got done testing out an insanely large number of animation events to see what works and what doesn't. I'll post a more complete list later, but for right now I'll say the events you want are "weaponDraw" and "weaponSheathe". Yes, even for your bare hands.
User avatar
ANaIs GRelot
 
Posts: 3401
Joined: Tue Dec 12, 2006 6:19 pm

Post » Tue Nov 20, 2012 8:04 am

*Races off to test this out.

THANKS! - Looking forward to that list too. I'm amazed by how constructive this community is.

:thanks:
User avatar
Mandi Norton
 
Posts: 3451
Joined: Tue Jan 30, 2007 2:43 pm

Post » Tue Nov 20, 2012 5:04 am

Alas, no dice. I had such high hopes too.

One thing is worrying me significantly though.

I tried RegisterForAnimationEvent(PlayerRef, "weaponSheath") in-game to no success << same naming convention as the ActionSheath ACTORACTION form

But I also tried RegisterForAnimationEvent(PlayerRef, "weaponSheathe") with the E on the end and both compiled. I haven't tried this in-game yet.
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Tue Nov 20, 2012 7:40 pm

Sorry for bump, but might this have anything to do with the fact that I'm not using the vanilla skeleton object? (nif?)
User avatar
kennedy
 
Posts: 3299
Joined: Mon Oct 16, 2006 1:53 am

Post » Tue Nov 20, 2012 4:51 am

Not to threadjack the question about animation events, but if you're already attaching an ability on the player with a magic effect, you could probably use the IsWeaponOut and IsWeaponMagicOut conditions on that magic effect in the ability, and then OnEffectStart/Finish change the player POV.
User avatar
Dina Boudreau
 
Posts: 3410
Joined: Thu Jan 04, 2007 10:59 pm

Post » Tue Nov 20, 2012 5:58 pm

Not to threadjack the question about animation events, but if you're already attaching an ability on the player with a magic effect, you could probably use the IsWeaponOut and IsWeaponMagicOut conditions on that magic effect in the ability, and then OnEffectStart/Finish change the player POV.

Not at all. :smile:

I looked at using those originally but I'm pretty sure I have to use RegisterForUpdate (*gasp) for those. Plus they are fallible, you will be forced into a POV you might not want. Ie, if your weapon is sheathed if you try to look around in 1st person the Update Event will force you back to 3rd person.

If I can get the Animation events working it is much, much cleaner, and I won't have to have an uninstall procedure.

*EDIT: I can get around the POV forcing with an extra spell which toggles the ability, but its starting to get more messy than I'd like at this point.
If my script worked.....so simple, so elegant............ *sigh
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Tue Nov 20, 2012 10:08 am

I can't speak to the technique's reliability--it seems to work fairly reliably when used on my follower, but I haven't tried in on the player--but you don't need to use RegisterForUpdate, a second spell, or anything like that, I don't think (always possible I'm missing something). The basic technique is described on the wiki http://www.creationkit.com/Passing_Conditions_to_Papyrus. The main question doing things this way, which I can't answer, is whether the POV change would happen fast enough.
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Tue Nov 20, 2012 12:50 pm

[SOLVED]

:rock: :rock: :rock: :rock: :rock: :rock: :rock: :nuke:

Got the Animation Events working. A big thank you to Verteiron, I would not have been able to crack it without your research.

So sleek, so elegant.
Spoiler

Scriptname APSBestowAbilityEffectScript extends activemagiceffect {Tracks Animation events on Player for automated POV switching.};DRAWN   = 1st Person;SHEATHED  = 3rd PersonActor Property PlayerRef Auto			   ;game.getplayertoo expensive for update events. Property ~1000x fasterEvent OnEffectStart(Actor akTarget, Actor akCaster)  If RegisterForAnimationEvent(PlayerRef, "weaponDraw")   ;Debug.Notification("Registered Draw")  endif    If RegisterForAnimationEvent(PlayerRef, "weaponSheathe")       ;Debug.Notification("Registered Sheathe")    endifEndEventEvent OnAnimationEvent(ObjectReference akSource, string asEventName)if (akSource == PlayerRef) && (asEventName == "weaponDraw")	 ;we got the DRAW animation event  Game.ForceFirstPerson()   ;Debug.Notification("Forced 1st Person")endif   if (akSource == PlayerRef) && (asEventName == "weaponSheathe")   ;we got the SHEATH animation event    Game.ForceThirdPerson()	 ;Debug.Notification("Forced 3rd Person")   endifEndEvent
Works like a dream.
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Tue Nov 20, 2012 5:25 pm

Just so you know, the game allows you to register ANY animation event, valid or invalid, to anything. I have tested 1654 animation event names (extracted from the behavior files). All of them register successfully. At a rough guess, I'd say maybe 50 or so actually generate events.
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Tue Nov 20, 2012 7:20 am

Just so you know, the game allows you to register ANY animation event, valid or invalid, to anything. I have tested 1654 animation event names (extracted from the behavior files). All of them register successfully. At a rough guess, I'd say maybe 50 or so actually generate events.

:D Lucky me. Thanks again!
User avatar
Donald Richards
 
Posts: 3378
Joined: Sat Jun 30, 2007 3:59 am

Post » Tue Nov 20, 2012 11:52 am

Animation events are due to change. I saw in the patch 1.6, a few events got changed, and new ones added as well. If you can read the behavior file, then you can get every animation event you want.

A sheer number of events will discourage anyone want to compile a working list. So it would be better if you just ask for any animation event you want and people will look it up for you (well, I could help when I had the time :tongue:)
User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Tue Nov 20, 2012 3:08 pm

I've tested over 1000 animation events as extracted from the havok files. If they are going to change them, they'd better hurry 'cause right now there are less than 100 active animation events across all active races. Just because an event is present in the hkx file is no indication that registering for the event achieves anything. Most events you can register for give you no feedback or event.
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Tue Nov 20, 2012 7:16 pm

I've tested over 1000 animation events as extracted from the havok files. If they are going to change them, they'd better hurry 'cause right now there are less than 100 active animation events across all active races. Just because an event is present in the hkx file is no indication that registering for the event achieves anything. Most events you can register for give you no feedback or event.

You missed my point friend. You can get all the name of the event by checking the Idle Animation tab in the CK, no need for behavior-extracting process. Plus, not all events are defined in the 0_master, just FYI. Different behavior files yield their own events as well

If you can read the behavior, you will see that what events are calling events (which you can call via Debug.SendAnimationEvent) and which are trigger-event (which can be registered-ForAnimationEvent). As their relationships are very well defined in the behavior .hkx
User avatar
A Lo RIkIton'ton
 
Posts: 3404
Joined: Tue Aug 21, 2007 7:22 pm

Post » Tue Nov 20, 2012 7:36 am

There are many animation events in the behavior files that are not visible from the Idle Animations tab but still trigger animation events if registered. Likewise, there are many animations listed in the Idle Animations tab that do not generate events.

The behavior hkx files contain a list of eventNames, the majority of which do not fire when registered, and a list of variableNames, which can be checked with GetAnimationVariableBool/Int/Float and may or may not contain useful and/or misleading information.

If you know a way to tell from the behavior file or the idle list which events actually generate events and which do not, please save me a great deal of time and tell me how :)
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Post » Tue Nov 20, 2012 2:45 pm

There are many animation events in the behavior files that are not visible from the Idle Animations tab but still trigger animation events if registered. Likewise, there are many animations listed in the Idle Animations tab that do not generate events.

Each race has its own set of animation events, a lot of them are being reused, are you sure you checked them all in the Idle Animation tab?

As I said before, a sheer number of events are too much to compile a list. It would be best if you just say what particular event you want to listen/register for and I will look it up for you

If you feel up to the challenge to find out a complete list yourself, there is a hkxcmd program in the nexus that let you convert behavior file into readable xml file. If you can read the xml file then it would take you about 15 min to understand what events are related to another, which event could be registered ForAnimationEvent
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Tue Nov 20, 2012 10:23 am

I didn't know there was a way to view them that didn't involve hkxcmd; that's how I've been getting the animation names for some time now. What I am saying is that that list is largely useless because many of the events that can be registered for will never actually trigger an event. Likewise, the Idle tab in CK is incomplete, as there are many events that can be registered for that don't show up there and most of them won't trigger when registered.

Since I have an interest in detecting and forcing creature animations for custom script-based AIs, I've been using bash scripts and perl XML::Simple to grab lists of animation events from every race's behavior files and generate PSCs that register every single animation available for that race. In addition, I have been testing which events are duplicated from 0_Master and which are unique to the race.

After registering ALL events unique to an actor and actually testing it in-game, I find the following:
  • Many events present in 0_Master get duplicated to race-specific behavior files, often with varying case i.e. footLeft vs FootLeft.
  • 0_Master sometimes contains events that will fire for a given race but are not present in that race's own behavior file.
  • There are many races that have animations not present in 0_Master.
  • Whether an animation is present in 0_Master, the race behavior or the Idles tab is not an indicator of whether using RegisterForAnimationEvent actually results in an event being triggered.
#4 is the important one, and the reason why you can't just look up the event in Idles or the hkx files and assume it will work when registered.

For example:
  • Horses use an almost identical animation event list to other quadrupeds, but they do not fire the syncleft and syncright events, despite being present in the file and other quadraqeds (and mudcrabs(!)) doing so.
  • Most enemies have a Ragdoll and RagdollInstant event present in the Idle Animations tab, but they never fire. Instead, when an enemy is ragdolled (not killed), "RemoveCharacterControllerFromWorld" fires. That event is not listed in Idle Animations, only in the behavior files.
  • Giants have combat and warning idles where they shake their club and yell at you. Although you can force them to do that with SendAnimationEvent or even PlayIdle, the event associated with that action NEVER fires. Instead, only the event at the end of the taunt fires, aggroWarningStop.
  • On the subject of Giants, you'd think it'd be easy to detect when they use their club attack, right? Not so much, since the attackStart_ClubAttack1 and 2 events never ever fire (despite being able to play them via SendAnimationEvent). Instead, you have to look for this sequence of events: weaponSwing, preHitFrame, HitFrame, StartAnimationDriven. Those (and some foot-related camerashake events between each) are the only events that fire during the clubswing animation, and thus are the only way to tell if the giant is attacking with his club, vs punching or stomping you. Also, sometimes AttackWinStart fires when he swings his fist, and sometimes it doesn't. There doesn't seem to be any usable pattern to it.
  • The Player actor is the most inconsistent of all. Since it's humanoid, it has to be registered for over 1000 events to test it properly. Needless to say, many of them don't fire at all, ever. You have to test them all in-game by running around doing things while watching the log with SnakeTail. Want to know when the character is in water? SwimStart/SwimStop never fire. Fortunately, SoundPlay.FSTSwimSwim does fire when you enter water, and MTState fires when you leave it. Neither are in the Idles tab. Want to know when you're casting a Ritual spell? The only Ritual event that fires is RitualSpellOut, and it doesn't fire until after the cast. I sure wish RitualSpellStart worked. Instead I have to watch for BeginCastLeft, then check to see if the "bWantCastLeft" variable is true.
Those are just a smattering of examples of the incredible inconsistency of animation events. It is a knotty problem and one I have devoted considerable time and effort to overcoming. I don't know why animation events don't behave as expected, but I speculate that there is some slight performance hit involved in triggering them in a manner accessible to Papyrus, and that the majority of them were cleared out as part of the game's optimization.

I hope you understand now why it is not just as simple as "looking up" the relevant animation events.
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Tue Nov 20, 2012 5:00 pm

What I am saying is that that list is largely useless because many of the events that can be registered for will never actually trigger an event.

Because there are a few type of event. From my understanding, they are:
- Trigger Event: which can be used to initiate animation. So you can use Debug.SendAnimationEvent on
- Transition Event: which event being sent when conditions are met. IE: when you are playing attack animation, and got shield-bashed to the face, you will receive 'staggerStart' event. In this case, 'staggerStart' is Transition Event and Trigger event at the same time, which results in you playing stagger animation
- Listening Event: events which are being notified when animations play or change states. These animations event are mostly tied with the underlying code, like 'hitframe', so you know when to calculate damage, when attack should hit, etc.... Or serve the purpose of scripting/Quest. These are only type of event you can RegisterForAnimationEvent

Depend on what animation state the actor/creature is on at that moment, some events work and the other become useless. Or some animation events are deemed not to much important to be 'Listening Event' by the dev and hence there is no need to make them Listening Event in the behavior files. Such unimportant events are mostly creatures' behavior.hkx , unfortunately. Most events you can RegisterForAnimationEvent are player/NPC's events, because they serve the purpose of quests/scripting

  • Many events present in 0_Master get duplicated to race-specific behavior files, often with varying case i.e. footLeft vs FootLeft.
  • 0_Master sometimes contains events that will fire for a given race but are not present in that race's own behavior file.
  • There are many races that have animations not present in 0_Master.
  • Whether an animation is present in 0_Master, the race behavior or the Idles tab is not an indicator of whether using RegisterForAnimationEvent actually results in an event being triggered.

For 1. & 2. & 3. I think you can somewhat read the xml, so you know a bit of programming, yes? 0_Master is what programmer call 'Abstract Class', which provide a 'general code' for other classes to extend on. So to use a 'parent' events on a 'child' object would not work sometimes as the 'child' class might have different implementation or override 'parent' event in some way (again, in different animation states)


  • Horses use an almost identical animation event list to other quadrupeds, but they do not fire the syncleft and syncright events, despite being present in the file and other quadraqeds (and mudcrabs(!)) doing so.

Yep, they have pretty much the same list of animation event, but how these events being used are not the same. As horse and other 'quadripeds' have different behaviors (in common sense, a horse is a horse, right? Not ... other quadrupeds) so they would behave differently, and have different states, different .... walks animation, different behaviors in general, not just footleft, footright, syncleft and right as you suggested

To sum up, they have different animation states, so animation register-able for a horse might not work for the others

  • Most enemies have a Ragdoll and RagdollInstant event present in the Idle Animations tab, but they never fire. Instead, when an enemy is ragdolled (not killed), "RemoveCharacterControllerFromWorld" fires. That event is not listed in Idle Animations, only in the behavior files.

RemoveCharacterControllerFromWorld is 'Listening Event' as I described above, not triggering event. It mostly tell when an actor is entering ragdoll mode

  • Giants have combat and warning idles where they shake their club and yell at you. Although you can force them to do that with SendAnimationEvent or even PlayIdle, the event associated with that action NEVER fires. Instead, only the event at the end of the taunt fires, aggroWarningStop.

Because they are different event types as I described above.
For your information, I looked into Giantbehavior.hkx, and have to tell you that there is no way for you to detect different giant's attack. Unless you define new Listening Event in each attack


I hope you understand now why it is not just as simple as "looking up" the relevant animation events.

I think I misinterpreted my point. 'Looking up' doesn't mean you just check the complete list at the begin/end of the behavior, but you have to read the corresponding state/animation for events you want. This way is much faster than trial/mistake for thousands of event as you did
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Tue Nov 20, 2012 7:02 pm

You're apparently gleaning information from the hkx files that I am not finding. The list of events appears to be entirely undifferentiated and I'm not seeing where they are being referred to again in the same file; how do I tell a listening event from a trigger event as you are doing?

And while registering all events and watching them in game may be inefficient, it allows me to build detection routines for things that there are no direct events for. You say there's no way to detect the different giant attacks; I'm already doing that, based on reliable event sequences :smile:
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm

Post » Tue Nov 20, 2012 8:41 am

how do I tell a listening event from a trigger event as you are doing?

If you looked at the actual animation file name, like:

Animations\horse_rider\WalkForward.hkx

There will be a 'trigger' flag that lead you to the other block. This block defines what events being notified along with the frame of which they are sent. These usually the Listening Events. Some Listening Events are defined at the beginning of the animation state, which tell you when actor is entering that state (so you can tell when player is beginning the swing animation for instance)

The trigger events are defined at the transition of the animation state. Usually inside the 'wildcadTransition' of the behavior file.

There are more, but, again, reading & understanding the behavior will yield the result you want


You say there's no way to detect the different giant attacks; I'm already doing that, based on reliable event sequences
So, what is a clean cut animation event to detect, say, Stom Power attack?
User avatar
Klaire
 
Posts: 3405
Joined: Wed Sep 27, 2006 7:56 am

Post » Tue Nov 20, 2012 8:36 pm

Thank you, that is exactly what I needed to know. I'll be sure to check out the actual animation files; I had thought everything was contained in the behavior hkx and the animation ones just defined the actual movements. In case it wasn't obvious, I've never worked with havok before ;)

That said, I'm not sure how much good it will do me, since you've establish there are no direct events for various attacks, and I need to detect them anyway. Here's what I accomplished using my approach:

So, what is a clean cut animation event to detect, say, Stom Power attack?

As it happens, the stomp is the easiest to register for, because it has an almost-unique event tied to it.

Here's the exact sequences of events fired by the Stomp attack:
Spoiler

SoundPlay.NPCGiantAttackStomppreHitFrameweaponSwingNPCGiantFootDistantRHitFrameFunccameraShakeStartAnimationDrivenFootRightattackStopStartAllowRotation

The first, of course, is a dead giveaway and can be used with 100% reliability to detect an incoming stomp. You could also use the preHitFrame/WeaponSwing/NPCGiantFootDistantR sequence to detect the stomp. That's the method used to differentiate the other attacks. Each one fires certain events in a certain order.

Spoiler

Run-and-club:
SoundPlay
weaponSwing
PreHitFrame

Back attack with club:
SoundPlay
PreHitFrame
WeaponSwing

Club swipe:
SoundPlay
InstantTransition
WeaponSwing

Club underhand:
SoundPlay
footLeft
InstantTransition
weaponSwing

Off-hand swipe:
SoundPlay
footLeft
InstantTransition
preHitFrame

As you can see, all of these attacks can be detected using only 4 script states: One to monitor the relevant events, one for when a possible attack is incoming, detected via SoundPlay, one to differentiate between Club Underhand and Off-hand swipe, and one to check that the Stomp sound effect was actually generated by the attack, and not by the giant entering bleedout. Of course, since the bleedout animation event actually works, that last one isn't strictly necessary.

Here's the script:
Spoiler

Scriptname ANI_CatchGiantAttacks extends activemagiceffect{Identify giant attacks by event sequences}Actor TargetFunction RAE(String AN)RegisterForAnimationEvent(Target,AN)Utility.Wait(0.01)EndFunctionAuto State ListeningEvent OnEffectStart(Actor akTarget, Actor akCaster)Target = akTargetRAE("weaponDraw")RAE("weaponSheathe")RAE("weaponSwing")RAE("FootLeft")RAE("FootRight")RAE("SoundPlay")RAE("preHitFrame")RAE("HitFrame")RAE("InstantTransition")endEventEvent OnAnimationEvent(ObjectReference akSource, string asEventName)If asEventName == "SoundPlay"  GoToState("AttackIncoming")ElseIf asEventName == "SoundPlay.NPCGiantAttackStomp"  GoToState("StompIncoming")EndIfEndEventEndStateState StompIncomingEvent OnAnimationEvent(ObjectReference akSource, string asEventName)If asEventName == "preHitFrame"  Debug.Trace("Giant attacks with kerSTOMP!")  GoToState("Listening")Else  Debug.Trace("Giant probably entered bleedout.")  GoToState("Listening")EndIfEndEventEndStateState AttackIncomingEvent OnAnimationEvent(ObjectReference akSource, string asEventName)If asEventName == "WeaponSwing"  Debug.Trace("Giant attacks with run-and-club!")  GoToState("Listening")ElseIf asEventName == "InstantTransition"  Debug.Trace("Giant attacks with club swipe!")  GoToState("Listening")ElseIf asEventName == "preHitFrame"  Debug.Trace("Giant attacks with back attack!")  GoToState("Listening")ElseIf asEventName == "FootLeft"  GoToState("CULH")Else;  Debug.Trace("False alarm.")  GoToState("Listening")EndIfEndEventEndStateState CULH ; either Club Underhand or Left Hand swipeEvent OnAnimationEvent(ObjectReference akSource, string asEventName)If asEventName == "InstantTransition"  Debug.Trace("So far so good in CULH state...")ElseIf asEventName == "weaponSwing"  Debug.Trace("Giant attacks with club underhand!")  GoToState("Listening")ElseIf asEventName == "preHitFrame"  Debug.Trace("Giant attacks with off-hand swipe!")  GoToState("Listening")Else;  Debug.Trace("False alarm.")  GoToState("Listening")EndIfEndEventEndState

As it turns out, there is one attack that the giant does that is not picked up, it's a walking off-hand swipe. He uses it so infrequently that I didn't actually see it until retesting this script just now. Other than that, this script tells me which attack he's using with very good precision, before the attack actually lands.

Is it pretty? Not really. Does it do what I need to do? Absolutely :)
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Tue Nov 20, 2012 5:17 pm

I see what you are trying to do, that's pretty smart way to detect attacks. I'm glad it suits you well.
But it seems that the script will tell you the attack-type when the giants' club is in mid-swing, not when it actually starts

For my combat & AI mod, I would need to find a way to detect what kind of the attack that actor is carrying out, right at the moment his animation starts.... Anything slower than that is too late

P/s: There is a way to cut down number of states a bit. You can try to introduce a variable check when certain animation event is fired. For instance, check for bAllowRotation when attack starts. This is how I can differentiate between normal attack and power attack in a script with just 1 registerForAnimationEvent
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am

Post » Tue Nov 20, 2012 7:02 am

Actually, you'd be surprised how early in the attack they fire, I know I was. When I built this script I thought it would be sluggish, but it's quick enough that I can interrupt the attacks before they deal damage if I need to. It's not as good as a dedicated event would be, but it's as close as I'm likely to get.

I poll some animation variables for detecting stuff like whether the player is in the middle of casting a spell, so I can have effects ready to go at cast time (pulling a rock from the ground so it can be flung for the cast, etc). Polling enemies for more variables is definitely something I'll try if I need more precise timing; at the moment I'm just adding additional effects or scripted reactions to some of the built-in attacks.

Thanks for all your help here, I've learned a lot about havok's behavior and a bit about its inner workings!
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm


Return to V - Skyrim