Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: scottstephan on May 27, 2013, 06:52:23 PM
-
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?
-
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?
-
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