Trigger Enemy Attack Animation Without Attacking

Discuss modding questions and implementation details.
Post Reply
l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Trigger Enemy Attack Animation Without Attacking

Post by l3lessed »

So, I'm still improving my ambidexterity mod. I have improved a number of things. However, I need to be able to get enemies to play their attack animation without actually triggering an attack roll or check. I want them to play an attack animation when the player hits them but does no damage; I'll combine this with a spark, so it looks like they deflected the weapon, and we can get rid of the wonkiness of the old system.

The ChangeEnemyState works, but it also triggers their full attack routine.

So, is there an easy way to trigger enemy attack animations without making them actually do an attack roll?

I know I could change their max damage or chance hit to 0 so it wouldn't ever hit the player, but then I would have to setup a store value to save the previous values and restore them after the attack animation ends. This seems overly complicated.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Trigger Enemy Attack Animation Without Attacking

Post by l3lessed »

I still can't find a solution to this.

Does anyone know how to just zero out enemy damage for a single attack or set their hitchance to 0? I tried accessing the summary vars for the enemy entity and setting those, but those are only set on the enemy creation and don't update when changed through the summary object it seems.

If could just zero out the damage or stop the actual hit check the enemy does, then I could do that and couple it with the attack state change to get an attack animations without damage to the player.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Post Reply