Really having a hard time getting this to work, not intuitive at all

Steen Petersen

New member
1) Why wont the lower picture not override the upper picture since I set the sequence to abort lower priority things?
2) why does the lower one (highest priority since its on the left) not recognize "collisions" with the obstacles layer at all? Absolutely sure the layers and tag are spelled correctly so its not that, checked 100x already.
3) why does flee not seem to care if it gets stuck in a wall? it keeps trying to travel in that direction, how would I make it, in this system, determine that it is stopped but fleeing and therefore should try a different direction.

I have watched all the videos and still very difficult to understand these flows of information - I really want an "IF" / "While" can someone explain kind of how one would go about making something that could be used as an if or while?

wont collide.png
 
Behavior trees are definitely a different way of thinking but once you get an understanding of them you'll wonder how you created AI without them.

1. I'm not following - can you explain more?
2. The best way to debug this is to set a breakpoint within WithinDistance.OnUpdate and see why a particular object isn't being returned. Just based off of your screenshot the magnitude may not be large enough.
3. Flee moves in a straight line away from the target. If you want a different functionality you can modify flee to move in another direction. If you describe what you want flee to do if it hits an obstacle I can also write that down on my to do list.
 
Hey thanks for the feedback, as for Flee I would guess one of the main issues at least with Astar pathfinding is this:
flee.png
It's trying to set its flee location outside the grid for some reason, isn't making a check for nearest walkable node
 
You're right - I'll add that into the next version. If you want to make the change yourself you can update Flee.Target to use GetNearest.
 
Hey I'm a noob at this too I hope this helps. I've been trying something similar to use what I've done was in the following below. I think you may want the until success Decorator, with within distance below it. That way if it's not within instance it won't instantly go to flee.
 

Attachments

  • Annotation 2019-03-07 195255.jpg
    Annotation 2019-03-07 195255.jpg
    49 KB · Views: 16
Top