how to do checks?

DageLV

Member
Basically i have AI script detexting if it can see a tank using a collider and raycasts, then assigns it as visible. CanSeeATank_Task just checks if the AI can see a tank, returns success, if not, returns a failure. if it cant see a tank, then its supposed to wander around till it sees one.
1685509010949.png
currently wander task is unlinked for testing, but as you can see, even tho the yellow tank is visible, can see tank still returns a failure.
Because behaviour designer doesnt work with colliders, i have to do the finding thru the base AI script.
1685509161246.png
Wander task never returns completed, because... its an endless task, it has no complete condition.
So how do i make CanSeeATank to return a success, if the first initial frame it returned a failure? ive tried adding "repeat" box there but it just doesnt work. i need to wander it until can see a tank returns success.
 
It looks like your behavior tree is running once and then stopping because it doesn't have anything keeping it active. You should follow a setup similar to this video, and also use a lower priority conditional abort:


Instead of idle from the video you can use wander since that stays active.
 
Top