The first part where I attach the event to the hellaphant animation event won’t play anything however I accidentally added the event to the hellaphants movement animation and it played but only in the middle of the map as if the listener were only where the game started.
The second part about called the emitter to play on the health script doesn’t work and instead gives won’t let enemies take damage at all giving me an error.
NullReferenceException: Object reference not set to an instance of an object CompleteProject.EnemyHealth.TakeDamage (Int32 amount, Vector3 hitPoint) (at Assets/_Complete- Game/Scripts/Enemy/EnemyHealth.cs:57) CompleteProject.PlayerShooting.Shoot () (at Assets/_Complete- Game/Scripts/Player/PlayerShooting.cs:108) CompleteProject.PlayerShooting.Update () (at Assets/_Complete-Game/Scripts/Player/PlayerShooting.cs:47)
Exactly the same for me. The event in the death animation doesn’t play, the same event in the move animation does play. Any idea why?
I converted the Unity project to a recent version (2020) and I’m using FMOD 2.02 studio and integration plugin ; that doesn’t seem to be a problem, the project seems totally valid.
Not triggered at all. Here’s a video showing the problem. Am I doing something wrong?
EDIT: sorry, the video didn’t captured that, but I’m doing a copy/paste of the event, from the move animation to the death animation. So it can’t be a syntax problem.
After some experimentation, I’ve discovered that a PlaySound event attached to the Hellephant’s death animation won’t play if it’s too close to the start of the animation. If you place the event at around 0:20 or later in the death animation, the FMOD Studio event will play.
I suspect the earlier frames of the death animation are being skipped somehow, as they do not appear to play when an Hellephant is slain in-game, but I have not yet found the part of the Unity project that causes this frame skip to occur.