Super Simple FSM documentation ~~~~~~~~~~~~~~~~~~~~~~~ FWORKS fairooze@gmail.com ------------------------------------------------------------------------------------------------ How to test the demo FSM samples ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the plugin content folder, look for these blueprints - BlueprintDemo\BP_TrafficLightActor - CppDemo\BP_SeasonsFSMActor Place these into a map of your choice, and start playing. - At the location of those actors, you will see text corresponding to the current state in their FSM - If you can see the state changing every few seconds, everything works! ------------------------------------------------------------------------------------------------ How to create your own blueprinted FSM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Refer to BP_TrafficLightFSMComponent as an example Step 1) - Add gameplay tags into your project, corresponding to your desired FSM hierarchy, for eg MyDemo.Idle MyDemo.Walking MyDemo.Running Step 2) Create a blueprint inheriting from SuperSimpleFSMComponent - Implement the event "On Register State Callbacks" - During that event, call "Register State Events" for each of your state gameplay tags, and assign the necessary Begin/End/Update events Step 3) At any time in your blueprint logic, perform transitions from one state to another by calling PerformTransition on the component and passing in the new state's tag ------------------------------------------------------------------------------------------------ How to create your own C++ FSM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All the steps are similar to the above, but in c++ instead. Refer to SeasonsFSMComponent.h/cpp as an example ------------------------------------------------------------------------------------------------- How to replicate your FSM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - On your actor properties, make sure that the "Replicates" checkbox is ticked - On your FSM component properties, make sure that the "Component Replicates" checkbox is ticked - That's all. Now only transitions can only be called on the server (ignored otherwise), and the state will automatically replicate to clients. ------------------------------------------------------------------------------------------------- Version History ~~~~~~~~~~~~~~~ 1.00 - Initial Release -------------------------------------------------------------------------------------------------