How to code or blueprint Valkyrie Profile or Indivisible turn based combat mechanic?

Hello
I saw Indivisible and Valkyrie Profile combat mechanic and it was pretty nifty.
Combat mechanic is that every character has button assigned to it and when pressed like ‘‘X’’ then ‘‘X character’’ attacks. And it is turn based combat.
So how to program that and I couldn’t find turn based combat for Unreal engine.
But I don’t know how to do it becuase I’m a beginner. I only need how to code the that mechanic not entire game.