Announcement

Collapse
No announcement yet.

UFSM: Finite State Machine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Submitted 4.22 version for review.
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      Submitted v2.1.0 for Unreal 4.22+


      WARNING!!!
      • "UNCHECKED" pin has been removed!
      • I do not recommend upgrading to UFSM 2.1+ in middle of a project, you might have to fix a lot of Blueprint errors if you use the removed "Unchecked" pin for anything (i.e, runtime states generation)
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        Hello Bruno,
        Just updated the plugin after using it for a while and loving it.

        Building the FSM in C++ from pawn constructor using the first post code example, i now trigger the error :

        Code:
        [2019.05.17-12.18.41:513][183]FSMs: Error: [StateMachine]: 'New States' Array is zero sized.
        [2019.05.17-12.18.41:513][183]PIE: Error: {FSM}:: 'New States' Array is zero sized. -->  FSM: Make States: [Function /Script/UFSM.StateMachineComponent:MakeStates at (ShooterPlayerStateMachine /Game/Maps/UEDPIE_0_Highrise.Highrise:PersistentLevel.
        Weirdest part is that the FSM is working.
        LinkedIn | Link custom Shaders | Atmosphere Modelisation & Procedural Planets | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

        Comment


          MaximeDupart

          Oh you say example from first page, that is outdated from plugin 1.x version.

          There's a more up to date example here:
          https://forums.unrealengine.com/unre...640#post991640
          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            Originally posted by BrUnO XaVIeR View Post
            MaximeDupart

            Oh you say example from first page, that is outdated from plugin 1.x version.

            There's a more up to date example here:
            https://forums.unrealengine.com/unre...640#post991640
            Perfect, thanks !
            LinkedIn | Link custom Shaders | Atmosphere Modelisation & Procedural Planets | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

            Comment


              Originally posted by BrUnO XaVIeR View Post
              Submitted v2.1.0 for Unreal 4.22+


              WARNING!!!
              • "UNCHECKED" pin has been removed!
              • I do not recommend upgrading to UFSM 2.1+ in middle of a project, you might have to fix a lot of Blueprint errors if you use the removed "Unchecked" pin for anything (i.e, runtime states generation)
              where's the new example project?

              Comment


                Demo projects can be upgraded by users, right click uproject file and migrate to latest engine version.
                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  Originally posted by BrUnO XaVIeR View Post
                  Demo projects can be upgraded by users, right click uproject file and migrate to latest engine version.
                  how to fix the "Unchecked" error?

                  Comment


                    Any function trying to access the removed enum item have to be edited to return a valid value from the menu dropdown.
                    If it's an empty state function I would just delete the function instead then recompile the Blueprint.
                    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                    Comment


                      Hi... Thanks for your support
                      I'm still getting the 'State ID doesn't exist' error when I try to add new states...
                      I can't add new states after 'Rollattack' state in the photo above... what should I do??
                      My UFSM plugin version is 2.1.1

                      Comment


                        You probably made changes to the instance of your fsm Blueprint then you made changes to the default asset of your fsm Blueprint.

                        Now your state lists are different.
                        You should make changes to list in your fsm Blueprint only. I only made it public to "Edit Anywhere" because of a editor bug (I see I must make it defaults only again to avoid this user confusion).

                        -----

                        I'm working on v3.0 so any changes to that is probably coming only in v3 update.
                        (this is fixed on v3, I have no ETA when it will be ready tho)
                        Last edited by BrUnO XaVIeR; 01-28-2020, 04:48 PM.
                        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                        Comment


                          Due to requests, in v3 I'm bringing back hierarchical FSMs, but in a "reactive" model (it's very similar to the way Unity's PlayMaker works), action-based.

                          This "Reactive Hierarchical State Machine" model is target for gameplay graphs (Blueprints) and isn't very C++ friendly to use (although it's still doable to implement it in pure code classes);
                          These nodes can be integrated with the existing FSM Component and can also have nested FSM graphs that can work as a hierarchy of FSMs to have an effective hierarchical state machine solution with editable graphs for each "Action". (I've put a lot of effort to design a system that won't cause infinite loops independent of whatever craziness you do with it)

                          The concept is very simple: you can create (R)FSM classes and attach them to a node, each can host how many "Actions" you need which you can also create a Blueprint graph for.
                          Once a FSM node is entered by your exec pins, it becomes active and starts executing it's stack of actions every frame until make the FSM exit its state:







                          I will also submit the usual demo project for reference, once the update arrives, this is the whole graph for the demo controller:




                          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                          Comment


                            v3.0 released for Unreal 4.24+, you can find updated demo project here:
                            UFSM_3.0.0_UE4.24_Demo.zip
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              hi, Is there a full c++ example?
                              I m looking at just a swing door demo (open, opening, close, closing, locked)

                              I have the states defined. I understand the begin, update, end (= StateMachineBehavior in unity)
                              but I am a bit confused on how to set up the state transition

                              Comment


                                Originally posted by FaSDt1517 View Post
                                hi, Is there a full c++ example?

                                but I am a bit confused on how to set up the state transition
                                There's this example in demo project (zip above)
                                https://forums.unrealengine.com/unre...640#post991640
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X