GC FSM - Event-driven, hierarchical finite state machines in blueprint

Hello,
I’m coming here for a design problem and I was wondering if you already encountered that problem before and know how to solve it.

Here is what my FSM looks like right now:
[0_fsm_is_opened.PNG]

What I want, as shown on the screen, is to avoid having to trigger BOTH “IsOpened” and “Battle|Call|Map|Alert” events to actually go into one of the OpenedFSM states.

I have found something that works, but I’m not sure it’s the best way to handle this.
I’ll demonstrate it for the Opened_Battle state only, as it works the same for the other ones.

I added a FName ExitEvent variable to my FSM, and changed the “IsOpened” transition to “Battle” for the demo:
[1_fsm_battle.PNG]

In BP_ADFSMS_Closed, OnExit, I’m now setting that ExitEvent variable:
[2_state_closed.PNG]

In BP_ADFSMS_Opened_Idle, OnEnter, I trigger the event a second time using that variable. Then I reset the variable.
[3_state_opened_idle.PNG]

It works: I now just have to trigger the event “Battle” to do Closed->Opened->Battle in one shot.

Do you have a better idea?
Thanks for the great plugin anyway! :slight_smile: