Im working on a small third person wave based shooter and ive almost finished, just working on small features.
Ive got the AI spawning in waves, moving towards the player and then shooting.
The AI character based off of the player character in terms of functionality, all in C++. Its got the same animation bp as well except for a few slight changes. Right now however the AI character is only using the rifle hip animations, i want him to (when in range) use the Aim Down Sight animation AND shoot the player at the same time.
This is my Behavior Tree right now, but for some reason the “Set Walk Speed” and “Aim At Player” arent triggered.
Simple Parallel will only run the sequence while its main task hasn’t finished. What is likely happening is Shoot Player is finishing immediately, which causes the parallel tasks to get abandoned. There is a setting on the Simple Parallel to indicate that the sub tree needs to finish before continuing.
Instead, I’d recommend placing all of those nodes in a sequence:
That didnt seem to work, i tried both methods you mentioned, one with all the nodes in sequence and the other with delaying the Simple Parallel from finishing. Still nothing, not sure why though.
I have watched, they literally just flash between each other and Shoot Player, So id assume theres something going wrong where they arent being triggered correctly?
I tried using Force Success but still the same issue - It seems to skip Set Walk Speed and Aim At Player and goes straight to the Shoot Player node
EDIT
Ive got it working slightly, He aims and shoots at the same time, however the AI is shooting WHILE raising the gun to ADS… so id need to be able to switch it around so he aims first and THEN shoots.
Make Aim at Player only call Begin Aiming, and have a separate task for Stop Aiming. that way you can control the flow of aiming, shooting, and not aiming in the behavior tree.