Help detecting knocked down state and attacks from behind

Post » Mon Nov 19, 2012 4:30 pm

Hi,

I was using the functions "isFaceingUp" and "isLeftUp" to detect when an opponent has been knocked down to the floor (through a push actor away magic effect) but it seems that this two functions come from Fallout and do not really work in Skyrim.

I also was using "GetLineOfSight" to detect when I was hitting the back of an opponent (If we are combat and he is not seeing me it must be because I'm behind him) and, while this approach was not a complete failure it seems that it is not very reliable (line of sight can return a 0 even if I'm almost in front of my opponent).

My question:

Are there better ways to detect knock downs and attacks from behind? Any extra condition I can add to make the process more reliable?

Thanks in advance!
User avatar
Benjamin Holz
 
Posts: 3408
Joined: Fri Oct 19, 2007 9:34 pm

Post » Mon Nov 19, 2012 10:40 am

For attacks from behind, I guess using ObjectReference.GetHeadingAngle() on OnHit() is a better idea. Remember to filter friendly fire and maybe other cases out. However this is a papyrus function, not a condition.
Regarding knock-downs, it may be better to just edit the "stagger" magic effects but if you insist on a manual detection, ObjectReference.GetAngleX() is what you're looking for I guess. Unless there is an IsUncouscious? Or maybe look at the animation graph to see when the "knock down" and "standing up" idles (or whatever they are named) are used, there may be a condition after all.
User avatar
mike
 
Posts: 3432
Joined: Fri Jul 27, 2007 6:51 pm

Post » Mon Nov 19, 2012 12:48 pm

Interesting. Thanks for your reply Perdev.

About attacks from behind: truth is that I'm trying to do everything I can without using scripting but since I will end up there sooner or later I'm sure your recommendations will come in handy at some point.

About knock down and staggers:

do you mean that at the highest magnitude (1 if I remember correctly) a stagger effect is similar to a knock down?
Also, I believe there is an IsUnconscious condition however actors knocked by the pushActorAway magic effect are not considered unconsious or are they?
Finally, I know there is a IsBleeding condition but I don't know if there is a magic effect that allows me to trigger it on hit. I don't believe so.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Mon Nov 19, 2012 10:27 am

do you mean that at the highest magnitude (1 if I remember correctly) a stagger effect is similar to a knock down?
I do not know about this. However I was thinking about the most powerful draugrs' shouts: either you're pushed and knocked down, either they do nothing to you. I guess this is only driven by the "magic resistance" mechanic. If I am right then you can consider that anytime the effect is applied, the player is knocked down. In the end maybe you will be able to find that knock downs are only triggered by a few spells with the same binary behavior: resisted or knocked down.

Also, I believe there is an IsUnconscious condition however actors knocked by the pushActorAway magic effect are not considered unconsious or are they?
I guess they are not but it may worth a test.
User avatar
Katie Samuel
 
Posts: 3384
Joined: Tue Oct 10, 2006 5:20 am


Return to V - Skyrim