Announcement

Collapse
No announcement yet.

Turnbased Battle FSM: Should it inheret AActor?

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

    Turnbased Battle FSM: Should it inheret AActor?

    Hey all! Currently learning UE4, and was wondering what would be the best thing to inheret/initialize from to implement a simple FSM for managing combat in a turnbased rpg? It seems making a BattleManager object would work best inherenting from AActor. What are your suggestions?

    Thanks in advance for the pointers!

    #2
    Sometime ago I built a hierarchical Fsm based on UObjects...
    Later on I considered that a huge mistake because designers couldn't easily see the intricate execution relationship of Fsm objects they have created themselves.

    Actors would cause "casting hell", so I scrapped hierarchical Fsm and built a different system based on Component class

    I made sure Fsm execution flow was built around regular UFunctions, allowing designers to actually define breakpoints on any Begin(), Update() or Exit() graph or any of their containing nodes;
    This way the "-Wtf is this happening?" moments coming from designers ceased to exist.
    Last edited by BrUnO XaVIeR; 06-17-2018, 01:12 PM.
    | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin |

    Comment


      #3
      Any object that needs to be tied to the level and manage other actors is best done inheriting from AActor. For example, the GameMode and PlayerController classes are AActors themselves, even if they have no physical or visual representation on the world.

      Comment

      Working...
      X