diff --git a/Source/UnrealFightingFramework/State/FFState.cpp b/Source/UnrealFightingFramework/State/FFState.cpp index c65d4d5..3609899 100644 --- a/Source/UnrealFightingFramework/State/FFState.cpp +++ b/Source/UnrealFightingFramework/State/FFState.cpp @@ -163,7 +163,15 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso // the appropriate flags are set. I think having this state finish reason is good but I may want // to rethink the way we handle logic for ending a state and which class is in charge of handling // what - InStateContext.Parent->GoToEntryState(StateFinishReason); + if(FollowupState != NAME_None) + { + InStateContext.Parent->GoToState(FollowupState, StateFinishReason); + } + else + { + InStateContext.Parent->GoToEntryState(StateFinishReason); + } + } diff --git a/Source/UnrealFightingFramework/State/FFState.h b/Source/UnrealFightingFramework/State/FFState.h index 18e5243..62bc2e3 100644 --- a/Source/UnrealFightingFramework/State/FFState.h +++ b/Source/UnrealFightingFramework/State/FFState.h @@ -126,6 +126,13 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties") bool bCanTransitionToSelf = false; + /** + * State to transition to when this state is finished. If left blank then the entry state + * of the state machine will be transitioned into. + */ + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties") + FName FollowupState = NAME_None; + /** * Animation to begin playing when this state is entered */