Hi everyone.
I need help
As you can see i simply want to AI move to “target” if it is set an actor. AI finding and setting the target and move to it. But never stops. I searched some topics but i couldnt find a solution to this issue. AI keeps doing “move to” action while it is nearby the target. never get it success.
I thing i missed a smal detail but really could’nt find it.
Thank you
Hi, did you try to increase the Acceptable Radius of the MoveTo node?
Yes, from 1 to 1200
Ok, did you check that your BTD_RangeCondition returns True (e. g. via print)?
BDT_RangeConditions is checking player is in the combat range of the enemy and the range is 100 in this logic. And “Goto” task is set 55. So the enemy move to player and stops if it is 55 that is working but. I want to when it stops the other logic should work. Because this decorators logic returns true. What am i missing?
And i did a print logic but as it doesnt exit the “moveto” node, this logic never works.
Sorry I completely missed that you use a selector there… =)
Selector will execute their children from left to right and stop as soon as one of them succeeds. Since the MoveTo node is furthest on the left, as it succeeds the selector will stop and therefore will never execute the branch with the BTT_Attack01.
So you could either use a Sequence node instead of the Selector (which will execute its children from left to right until one of them fails, so it will execute the MoveTo and afterwards the branch with the BTT_Attack_01). Or if you want to stop the MoveTo if its closer than a certain distance (and don’t want to use AcceptableRadius) then you can move your BTD_RangeCondition to the MoveTo, invert it and set it to abort self. So that the MoveTo will stop executing as soon as its closer than what you have in your BTD_RangeCondition.
Oh my god, I realize now when you said! that is selector! Thank you for the attention