Two issues here:
-
If your bot is not chasing the player’s updated location while it is still traveling, that is expected behavior (see “live pursuit” below).
-
If your bot is totally dead after traveling once (until the player comes near again) that’s got be a a setup issue in your behavior tree!
Your DummyState is probably no longer “Combat” because the bot went out of the player’s range OR your service is constantly flipping it between Combat and Patrol for some reason; only that or a rejected query (logs will tell you) would explain the spamming on the right branch.
–
Live Pursuit
Back to 1) - FlyTo node doesn’t provide this out-of-the-box! It is a low-level task that simply 1) solves a path and 2) moves your pawn along that path.
In my game I use a simple distance delta check during pursuit and abort FlyTo based on that. If the distance between the “last known target location” (i.e. the location we’re currently moving to) is significantly greater than the “live target location” (i.e. the current location of the pawn we’re chasing) then I abort and restart the FlyTo task using a boolean decorator.
Maybe you can chain a boolean decorator (for easy aborts) with your inverse distance check. You’ll have to play around with it a bit to get the aborts firing correctly though.
–
Plugin enhancement idea:
The plugin can be enhanced to provide “live-pursuit” functionality OOTB (using a TargetActor" BB key), but I’m extremely busy working on my project right now and can’t commit to this, so managing it in your behavior tree and service is your best bet for now.