State Machine for logic

My team is building a game and we plan to use state machines to control the player animations and logic. Ideally I want to make a state machine that can control the animations as well as change the logic that is running. For example, if the player goes into a flying state I want to disable player input and maybe set some variables or fire a function, when they land and the state switches to landing I want to change more variables and re-enable input or spawn an emitter.

Animation blueprints seems fairly obvious to control animations but I don’t see a easy way to enable a more general state machine. Preferably not having to manually set a state variable via a enum in code/blueprints when doing anything. While i think manually control a state variable may work this project is rather large scale and our states will be getting very complex so manually setting a state variable could get difficult to keep track of /keep understanding of.

I’m fairly sure Unity can do this easily, not sure why it seems so hard in Unreal.