So, lets say I have a number of stuff I want a unit to do when I give it an attack order, like:
turn towards the target
play a raise-weapon-animation
fire a few times
lower weapon
I would prefer to do that in C++, but got no idea on what Unreal offers me to do that - and a simply timeline wouldn’t be enough, as step1 would take time depending on the units location. In Unity3d I would simply start a coroutine…
You can use the timer manager and delegates to call callbacks after a certain amount of time. You could build a command queue and pop off the front once the first timer delegate has finished.
Command Queue approach is simply understandable and useful much. You should take this. For the completion time issue, you can simply add a method inside the commands where you check if the command finished based on the custom rule. The rest is the detailed parts, how to know if animation finished, how to get the actor location and compare it, and so on.