It should actually be quite simple to add. There are of course many ways to do this, and it will depend a bit on what you want to accomplish. I will assume that you are trying to do something akin to the original Fallout games or Arcanum, where action points can be used to walk, and attacks can have varying action point costs. Say, you have 9 action points where you for example use 2 to move, 5 to attack with a shotgun and 2 to kick. Here’s one way to accomplish this:
I’d first create a new public integer variable for Unit_Parent_BP called “Max Action Points” so that different units can vary in this attribute, and that it can easily be modified from other blueprints. Also, create another called “current action points”. When a unit moves, subtract the length of the path holder array (minus one, since it includes the start index) from its current action points. When it attempts to attack, first call a branch which returns true if current action points is greater or equal to whatever action point cost the attack has. If it’s true, resolve the attack and subtract the cost from Current Action Points; if not, display “not enough action points” or whatever best gets the message across. At the start of each new turn make sure to again set current action points equal to Max Action Points.
Edit: Forgot one thing. With the current setup, turns automatically end after an attack is resolved, which would have to be changed. I would add a new branch at the end of movement checking if current action points are 0 and in that case call the End Turn function. You’d have to replace the End Turn function at the end of an attack with something similar. If there are still action points left after attacking you’d set Combat Mode to Choose attack (not sure if I’m using the exact names. I’m at work and don’t have access to UE4) and call find tiles in range again. You’d have to implement a way for players to end their turn with remaining action points. Either a UI button or clicking their character during choose attack. Also if you’d want the player to be able to do the reverse: first attack, then move, it would take a bit more work. You’d have to call both find tiles in range and pathfinding at the same time at the start of each turn and rework the on tile clicked logic to reflect that these combat modes have been merged. I’m working on implementing this, actually, but that won’t be for a couple of patches.