The LxMotionParameter parameters are generic. Meaning motions can use them however they want. I just found it was convenient to have one generic parameter than a specific values for every motion.
With my Basic Damaged and Basic Killed motions, I took the approach that I’d change the animation based on the direction the hit came from. So, being hit from the front has a different damaged animation than being hit from the back. With the motion packs, I used L0MotionParameter to be the angle the attack came from. That’s why you see the conditions in your image.
Here’s the flow…
In the WeaponCore.OnImpact, I send the combat message to ActorCore.
In the ActorCore.SendMessage, I send the combat message to the BasicDamagedReactor.
In the BasicDamagedReactor.Activate, I send the combat message to the MC and BasicDamaged picks it up.
In the BasicDamaged motion (line 257), I activate the motion and set the parameter as the attack angle.
So, changing the damaged animation as related to my attack angles is easy. You’re just doing what you’ve been doing with the animation replacements.
The reason for these steps is so you can hijack the combat message at different points and modify or cancel it. The reactors are where you really want to make decisions.
To do this, you’re going to create your own “damaged reactor”. With that, you can start to make some decisions and activate different motions.
For example, your reactor could evaluate the combat message and if the damage is less than 10, you do what my Basic Damage Reactor does. If the damage is > 10, instead of activating my “Basic Damage” motion, you activate my “Pushed Back” motion. If the damage is > 100, you activate my “Knocked Down” motion.
Pushed Back and Knocked Down are different motions than Basic Damaged. I did it this way so you could create new motions with new animations… Maybe you want one that flies you back in the air or kills you instantly.
The reactor is the thing that you use to determine how to “react” to the combat message. It’s where damage is applied and the motion (animation) is started.
I hope that makes sense.
With this, you can customize the damaged reaction, the damaged motion, and/or the animations how you see fit.