Action Queue Component
What Is It?
You can execute actions without the usage of the
Action Queue Component. It's just a included storage possibility.
How To Use?
Adding The Component
To use the
Action Queue Component just add it to a host actor, player controller, character, or where ever you want to hold and execute
Action Queue Component API is intentionally very slim, it's meant to only hold
Actions after all.
Let's break this down a bit.
Action Queue Component let's you queue up actions.
In this example it just constructed one and enqueued it. However,
Actions can be created somewhere else and be passed in.
This gives you greater flexibility over how and when to execute. If you simply want to dequeue and execute the component does it all for you. However, if you want to add additional data to the
Action being dequeued you can simply dequeue it and execute it yourself.
Dequeue & Execute
Action Queue Component provides some utilities so make your life easier.
If you used Dequeue & Execute you don't have to cache the executing action yourself, the component keeps track of it.
You can simply retrieve it via the pure node
Get Executing Action.
Be carful here, if you use a mix of
Dequeu and Execute it is possible that the returned
Action is a relict from a older
Dequeue and Execute or is invalid in the first place.
To be save to access a dequeued action you can either check if it's valid or use the provided utility function