About search node

ShadowZie

Member
Screenshot_891.pngScreenshot_893.png

I use the search node and It was working fine but I just notice that the mob sometimes will just go a bit forward and he will just stay there. only if he see a target he will move but if not he will stay in the same place and won't search

what should I do?

thanks
 
It's really hard to tell without being able to see the behavior tree in action and step through the code. I recommend taking a small section of your tree and isolating it so you can evaluate each task to determine if it is performing as expected.
 
Hey thank you, I tried it but it does kinda work the thing is the AI will go to the same place for some reason and he will stop there:/
Most of the tree is off I left only the death
even If I move the mob he will return to the place that he stopped
the settings that I did in the photo are fine?
each time that I start the game he will go to the same place

Screenshot_894.png
 
It looks like your other tasks are disabled so it makes sense that your tree is going to the same branch. This is good since you are testing out that particular branch.

You can now step into the task to determine why the agents are moving to the location that they are moving.
 
It looks like your other tasks are disabled so it makes sense that your tree is going to the same branch. This is good since you are testing out that particular branch.

You can now step into the task to determine why the agents are moving to the location that they are moving.
I think I found the problem, seems it will only run the node only one time, and then when he arrived at a random location he just stopped and won't search why?
I did a debug when he search and set target and after he got to the first location he just stopped running the debug but on the tree the node is on green

I think it may happened after I updated to the newest version but I am unsure
 
The behavior tree execution hasn't changed in awhile so chances are the scene conditions have changed. When the agent is stopped you can look at the graph to see what tasks are running and take a closer look why they aren't doing as what you would expect.
 
The behavior tree execution hasn't changed in awhile so chances are the scene conditions have changed. When the agent is stopped you can look at the graph to see what tasks are running and take a closer look why they aren't doing as what you would expect.
Thank you, I checked a few things seems that if I set the stopping distance to something like 1.6 he will not work and will go to the same place
but If i set it to 2 it will work fine any idea why?
Screenshot_900.pngScreenshot_899.png
 
It could be that the agent doesn't think that they have arrived when the stopping distance is 1.6, but has when it is a value of 2. You can check this within the HasArrived method of the search base task.
 
Top