Alright, it’s working! Satisfaction levels are high. Addressing your comments :
Could you be wrong? I may be misinterpreting, but you say “Rather than removing the units after initiative is sorted…” even though that graph pic showed everything was before that. Notice how all my added added nodes were executed before the “Sort Actors in Initiative Order” node, not after.
In any case, the solution just needed some tweaks in BP knowledge (1) and logic (2). I didn’t know that when I made a Getter function in BPI_Initiative, I would need to go to my BP_Unit and plug into this new function my boolean variable (1). So it’s a two-part operation, Neato. In regards to the logic, instead of using a temporal array for the loop and messing with the Remove pin, I simply created the temporal array in the loop and used it for the final “Sort Actors in Initiative Order” input pin (2).
Results are as follow (green chart has legacy code; white one has the new additions):
The way things are: if I create child blueprints, they seem to be the melee type but they can hit, move, receive hits and are an existing element in the grid. Their attributes seem to be able to be adjusted correctly too. They do not have a health bar, but I suppose this is because we have to manually add it, like the BP_Unit_Anim_Adv guys have. However, as soon as I create a static mesh component inside, they stop working. They get a turn, but cannot move, attack, or be targeted by enemy fire. For testing, I simply created a child BP and added the toolkit’s SM_Tree_01 mesh.
The regular BP_Unit blueprint cannot move, attack or be attacked either, but with this one other units can walk right through or into its tile too. It just gets its turn, but isnt able to use it for anything. Not that I would use BP_Unit for anything though, since their children is what we’d be using.
I created a default new project and started from scratch in the default hexagonal map. Both regular BP_Unit and its child seem to be working fine. However, as soon as I attach a static mesh (SM_Tree_01 for example), they lose their ability to be fired at. Is this behavior okay?
Gotta try debug why the heck my project doesn’t have this very same behaviour with BP_units and childs, since I haven’t modified any of those blueprints. I bet it’s something in the GameMode/PlayerController/TurnManager. I’ll see what I can dig up. I do get these errors though so maybe that will point me to where the problem is:
Thanks for your explanation! I’m slowly getting the hang of this and being able to tackle more tasks by reading more and practicing. It’s all very mentally rewarding.