|
Post by bender on Jul 11, 2019 3:04:37 GMT
I have followed some of the videos online and can't figure out why my Animation Receiver is not being triggered to Play and animation.
I have a vGenericAnimation attached to my player. The Animation Clip is "stabbing" and Animation End is 0.8
My current "stabbing" Animation is shown in the picture.
My AnimatorEventReceiver is placed on the enemy and setup as shown below.
Can anyone point me in the right direction? Or if you know of a better way to stab your opponent?
|
|
|
Post by Invector on Jul 11, 2019 15:18:09 GMT
If the 'stabbing' clip is on the Animator of your Player, then it will call the StopStabbing event for your Player and not the Enemy.
What you can do to communicate the stab to your enemy, is to create an ObjectDamage for your stab object with a Custom Damage that will kill the target
|
|
|
Post by bender on Jul 11, 2019 18:39:53 GMT
Both the Player and the Enemy share the same Animator Controller. You have a good idea. As a work around for now I have a GenericAction on the Player and on the enemy I have a sub-object which has a TriggerGeneric(Action), I think that's what it's called. Then on OnDoAction() I have the Player stab and the Enemy perform the "die" animation after 0.75 seconds. The TriggerGeneric(?) is set to Destroy. I can do this since I want the enemy to always die when attacked from behind. Sort of a stealth thing.
|
|