I’m currently learning to work with Behavior Trees and Blackboards and I need a little help with optimizing what I have.
What’s going on is I’m trying to get an NPC Character to search for the Player Character after losing sight of the Player (which is done through a Line Trace) at points of interest. Currently I have it setup where once the NPC Character shoots the Line Trace and doesn’t detect the Player Character—>the NPC Character will then trigger a Bool variable called E-Mode to True which will then trigger another Bool variable called TargetPoint1 to True which will make the NPC Character move to the first point of interest. Once the NPC Character reaches the first point of interest, then it triggers a Bool variable called TargetPoint2 to True and TargetPoint1 to False which then makes the NPC Character move to the second point of interest.
Although this system works, if I end up having say…100 different points of interesting then I end up having 100 different behaviors and variables (not saying I will haha). Is there a better way to get the NPC Character to move to multiple locations or better way to store the locations and call them in one Blueprint? I’ve included screenshots of what I’m working with.
Thank you for reading!
EDIT: I’ve tried to use Arrays but I can’t seem to get those to work properly so let me know if that’s one way to do it then I’ll study up on that!