playMaker

Author Topic: How do you start an animation and move to next state?  (Read 2991 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
How do you start an animation and move to next state?
« on: March 31, 2015, 11:44:59 AM »
So I have an animation (legacy) to play.  I just want to start the animation and move on to the next state.  looking at the picture it seems that this action waits until the animation is done before going to the next state.

The only way I know how to do this is to set up another FSM and then 'send event' to that FSM to start using a global event.  This just seems a bit much.

Any ideas?
« Last Edit: March 31, 2015, 12:00:17 PM by wheretheidivides »

redikann

  • Full Member
  • ***
  • Posts: 174
Re: How do you start an animation and move to next state?
« Reply #1 on: March 31, 2015, 03:25:03 PM »
If your using Legacy you should be able to populate an array in the inspector with animations you want to use. Playmaker should be able to fire that animation and move to the next state (with a send event if you need to move immediately). I wouldn't see why you would need a new FSM component. A simple state transition should suffice.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you start an animation and move to next state?
« Reply #2 on: March 31, 2015, 05:15:44 PM »
Whenever I try, it plays the animation but will not go to the next state.  What am I missing here?  the only way I found to do this is by sending an event to another FSM.

BTW:  the array is a neat idea, but I just want to play an animation (start it) and go to the next state.

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: How do you start an animation and move to next state?
« Reply #3 on: April 02, 2015, 11:32:42 AM »
I think I see it.... in your 3rd picture... don't "Finish" or "Loop Finish" the animation - leave it blank. The FSM will run the action then move to the next action in the stack, it should automatically do the FINISH transition when it reaches the end.

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: How do you start an animation and move to next state?
« Reply #4 on: April 02, 2015, 02:12:56 PM »
Not sure if it helps but you know that you can trigger an event from a timeline event (or whatever its called) on the animation? just rt click above teh timeline, and add an event...

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: How do you start an animation and move to next state?
« Reply #5 on: April 02, 2015, 09:17:47 PM »
"I think I see it.... in your 3rd picture... don't "Finish" or "Loop Finish" the animation - leave it blank. The FSM will run the action then move to the next action in the stack, it should automatically do the FINISH transition when it reaches the end."


Actually, I tried that with finish but it still hangs up.  It won't go to the next state.  I've tried all of the settings.  Someone had to have this before.

My temp solution is to set a FSM up with several animations and I just send an event to that FSM.  Only 1 animation will play at a time so it works.