BehaviorTree MoveTo - Dynamically set Acceptable Radius

Hello there,

First of all let me tell you what I want to accomplish:
I´m trying to develop a behavior for an rts-style game, where a unit attacks all enemy units in a path till it reaches the “headquarter” of the enemies and attacks this one.
For now I want to implement an attack range for the unit. This means, is the next enemy at range, the unit should stop moving and attack the enemy instead.
Edit: Thats what I have so far, detailed graphs shouldnt be necessary for the question tho, I guess.

I found the Property “Acceptable Radius” for the “MoveTo” node, which basically tells the node when its ok to stop before the final destination is reached. As far as I experienced, it already consideres the bounds of the enemy. Thats the reason I would like to use it.
The problem is, I haven´t found a way to change the “Acceptable Radius” dynamically, so different units could use the same BT, just by changing a variable in the BlueprintActor of the unit which then changes the “Acceptable Radius”.

So my question is: Is there a way to change the “Acceptable Radius” dynamically depending on the controlled Actor?

Not yet, at least not in Blueprints. But there will be in 4.8. Stay tuned.

In C++ it’s the usual way - derive from BTTask_MoveTo and instead of using AcceptableRadius call a function on your AI.

Cheers,

–mieszko

Thank you! I will stay tuned.

Was this implement in blueprints in 4.8? I don’t see it.

Looks like this one dropped off from the radar. It’s not even in 4.11. Can someone at Epic put this back on the road-map?

1 Like

Posting for those who might find this via Google Search.

This seems to work - it achieves the same outcome.

May be that’s how it was implemented instead of overriding the BTTask_MoveTo task?

2 Likes

This is not exactly the same as “MoveTo”, it lacks a very important function “ObserveBlackboardValue”, so it is better to implement a new “MoveTo” in C++