playMaker

Author Topic: Animator Send Event Sometimes not Triggering?[SOLVED]  (Read 387 times)

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • View Profile
    • Indie RPG Creator
Animator Send Event Sometimes not Triggering?[SOLVED]
« on: September 12, 2019, 08:36:12 AM »
Hello,
I am using the 'SendEvent' function from animator to tell that the animation is complete. But sometimes it doesn't fire and resulting in messing up with the animation flow. Is there an alternative way to know that the animation is ended?

I've tried to put the trigger millisecond before the end of the animation, but it still not triggering sometimes.


Thank you!
« Last Edit: September 20, 2019, 05:16:47 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15443
  • Official Playmaker Support
    • View Profile
Re: Animator Send Event Sometimes not Triggering?
« Reply #1 on: September 13, 2019, 01:17:32 AM »
Hi,

 that's very odd indeed, is it 100% reproduceable? can you isolate the animation in an empty scene with just the animation? if yes, can you send it to me?

 Animations are very reliable, so could it be that in your fsm, you are not listening to the event at the time it's sent? maybe you did not plugged the sendevent properly, is it targeting the right fsm? is the gameobject/fsm enabled ?

bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5945
    • View Profile
    • jinxtergames
Re: Animator Send Event Sometimes not Triggering?
« Reply #2 on: September 14, 2019, 04:52:02 AM »
Hi.
I can confirm that send even is not 100% reliable with animation events.

Tested with spritesheet animation with 45 sample rate.

The 'animation event' sends a event, and in that state i send an event to another fsm on a different object.

It seemed to happen sometimes when many windows are open (giving lag the the gameplay)

Instead i use 'Set State' now (with target state name) which seems to work 100% (so far)

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • View Profile
    • Indie RPG Creator
Re: Animator Send Event Sometimes not Triggering?
« Reply #3 on: September 14, 2019, 08:31:59 AM »
Hello,
I think I found the culprit, my bad. Just like Jean said, my 'listener' FSM isn't listening at the time when animation event triggers.

I manage to fix it by using a global transition for the animation event trigger. It's working fine for now.

Haven't tested it yet with multiple/crowded animations like djaydino doing. Will let you know if I found something.


Thanks!