Hi, I bought this plugin a few years ago but just coming back to Unreal after developing my own FSM system in C#. I’m glad to see it’s still being updated so I’m going to be using it for my project (no C++ unfortunately). I’m a little disheartened to see the documentation still very lacking beyond this thread and the API reference but it is what it is I guess.
So I guess I’ll just need to ask some questions instead, but apologies if they have already been asked.
-
I’m not currently needing a ton of complex use from my FSM although that might change in the future. But one thing that I will be doing a lot is playing an animation montage within a state (let’s say, PlayAnimation) and waiting for it to finish before switching states back again. I understand that if this was in an animation FSM I can just set the state when the transition ends, but since this is a montage and I want to play the montage from the OnBeingPlayAnimation, I have a variable set up that reads the montage length then, in the FSM event graph I’m doing a switch on the update and simply using a delay with this time before manually setting the state back to normal. This is pretty yucky to me and I can’t imagine it’s the preferred method, so is there some built in way I can do this? I can’t use a delay within the OnUpdatePlayAnimation, and honestly that’s still a bit dirty anyway.
-
Would the general preferred method be to use both the FSM component as well as the AnimBP to control where the states go or try and keep it to the FSM component as much as possible for cleanliness?
-
I would like to keep all my gameplay functionality contained within the states. So for example, when the user presses the jump button, if it’s in the normal state it will jump, but if it’s in a crouching state, it will stand (or whatever). I know I could get the current state and do a switch based on that, but that feels like it flies in the face of the FSM philosophy (moving away from enums and conditionals towards self contained code). However, we are only given begin, update, end and finish. How can I encapsulate more than that within a state such as events? This seems like a core piece of the puzzle to me to keeping state machines organised.
I will undoubtedly have some more questions as I go down this rabbit hole, but if you could give me some advice on the best way to set this up I’d appreciate it 
-edit- I’ve switched it so in the OnUpdatePlayAnimation I’m checking the animbp if any montage is playing and when set to false I’m going back to the normal state. Again, unsure if this is the best way but seems much better than using a delay.