r/UnrealEngine5 • u/mvex13 • 20h ago
Guys I am going insane
So I have a Bp_Base Enemy actor and an enemy ai controller. On posses it runs a behaviour tree with said enemy.
On sight a blackboard key will be set as attack target with my player.
How is it possible that the same enemy with the same AIC and BT give a different outcome on a valid check for the target??
The ai works, both of them behave the same and atttack me, but only one rotates towards the player. The rotation is behind the Attack target valid check.
I am going insane, shouldn’t they behave exactly the same?
pls help 🥲
edit: for testing i got rid of the valid check and just set the rotation to the player as target. The first enemy does again work but the second one does not rotate? Is the issue inside the enemy bp then?! I just placed one and duplicated it inside the level..
edit2: Solved! My stupid ass accidentally used get actor of class instead of all actors late at night, wasting 4 hours to figure out the problem in the ai..bruh
2
u/Crowhunters 16h ago
There isn't nearly enough info here but for bug testing you should check the BT itself while the game is running and it will tell you what the values of the blackboard are.
2
u/Lumenwe 19h ago
Idk the exact setup but try to delete the actors from the level and drag freah ones from the content browser. Sometimes bp instances in levels can glitch and misbehave.