playMaker

Author Topic: Moving on from an event that never finishes (2D Toolkit)[SOLVED]  (Read 2077 times)

scottstephan

  • Playmaker Newbie
  • *
  • Posts: 6
So, I have a sprite that I move with a character controller & character motor. When the player moves right, I use 2D Toolkit to play an animation attached to the Tk2D Animated Sprite Component.

Here's the issue- That animation loops, so it never FINISHES. As a result, my FSM gets stuck in that state. How can I tell it - "Just start the animation and don't worry about it, keep going unless I tell you not to"?

Do I need to dispatch to a seperate FSM that controls the animations? They're so tightly integrated with the movement that that doesn't seem quite right. Or is that the only way to get it to "move on" so to speak? To create another FSM that's stuck in that state until I manually dispatch an event to free it?
« Last Edit: May 28, 2013, 01:42:21 AM by jeanfabre »

scottstephan

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Moving on from an event that never finishes (2D Toolkit)
« Reply #1 on: May 27, 2013, 07:01:07 PM »
I think some of this stems from the learning curve with events. Could I just include a kind of sub-FSM within the current FSM and use Send Event to broadcast when I want to swap its state?

scottstephan

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Moving on from an event that never finishes (2D Toolkit)
« Reply #2 on: May 27, 2013, 07:11:00 PM »
Classic. As soon as I post about it, I solve it. I created another FSM on the object called "animationManager". When I move to the right, I dispatch the right event, vice-versa for left. This tutorial helped: http://www.youtube.com/watch?feature=player_embedded&v=dgdxWJcuaWo