Announcement

Collapse
No announcement yet.

[Request] Behavior Trees - Simple Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Resolved

    Ok so I had already done that but I guess I was just missing something very simple. I added the debug features of the trace so I could see how it was functioning and it was not functioning. I had narrowed it down to that point. I then realized that the line trace was using visibility and not camera. After I made that change I was able to get it working. I went back through my other attempts and I missed this same drop down every time!! But in any case it looks like it works as of an hour ago.

    The next stage is to really work on understanding what is happening here so I can modify it to suit my needs.

    Thanks everyone for all the help!


    Originally posted by Warmak View Post
    I did the same thing, following tutorial a few times. This is what is missing from the tutorial - set the desired object types that the multisphere trace uses:
    Last edited by mikezteh69; 09-08-2014, 11:57 AM. Reason: Added title

    Leave a comment:


  • replied
    I did the same thing, following tutorial a few times. This is what is missing from the tutorial - set the desired object types that the multisphere trace uses:
    Click image for larger version

Name:	agro.png
Views:	1
Size:	68.6 KB
ID:	1056414

    Leave a comment:


  • replied
    Have you actually tried stepping though your blueprints and seeing what values are being used? Its a good idea to get used to debugging your own code, so this sounds like an ideal opportunity. Set a breakpoint in the event nodes (F9) and step through each node, seeing what inputs are being used (hover the mouse over the pins from the previous nodes to see their value). See what the values are and think if they look right or not. Usually I see errors like this because one of my casts is going wrong (i.e. its not the correct class to cast to etc). So make sure all those things are returning values that make sense.

    One example of doing this, is that I was having an issue with my BT until I realized that the angle of the AIController is not the same as the angle of the AICharacter it is controlling. Just an example of silly things that catch you out. So my recommendation is to try using your own debug skills to find this. Be methodical and check every input against what you expect. If something is off, go back and figure out where it went wrong.

    Leave a comment:


  • replied
    So I have gone back and done this from scratch 2 more times using the 3rd person BP mode and both times it failed. Is there something that i am missing here that differs greatly from the top down that would cause this not to work?

    Leave a comment:


  • replied
    I went to look at my blueprint because I did get this to work but when I went to my last project the work I had done was gone. I did have some problems when it was working. Whenever the bot would follow my player my computer would lock and completely stop working for about 5 seconds once I had the task manager up while it was running and for that short period of time Unreal was not responding. If I was not near the bot and it was not following me I did not have any problems but as soon as the bot started following me my computer would competley lock for 5 second or more. I have not had that problem with any other things I have done I have done a few other Behavior trees and they worked with not problem. I am going to redo this tut and see what is going on I suspect something is not right in ArgoCheck maybe something with the arrays.

    Leave a comment:


  • replied
    You are right, I did zero that out to check for changes. The thing is, the tree seems to find the player when he comes within range, however he does not start to pursue the player..

    Leave a comment:


  • replied
    The only difference I can see is that the sphere trace you are doing is using the same point for both start and end as you are not adding (0, 0, 15) as in the example, rather that value is (0, 0, 0) in your graph.
    This means you are doing a zero-length sweep, which will not hit anything (the implementation ignores very small sweep lengths).

    Leave a comment:


  • replied
    Apologies. Have a look at these.
    Attached Files

    Leave a comment:


  • replied
    Sorry I should have been more clear, it is the 'AgroCheck' service BP that I was suggesting to check over, as that is the BP that sets the Blackboard entries that the behavior tree relies on.

    Leave a comment:


  • replied
    Here are some shots of the other BP. I changed the BP name in this version.

    Attached Files

    Leave a comment:


  • replied
    Originally posted by mikezteh69 View Post
    What's confusing is that I did this twice from scratch with the same results... I am not sure where I did not set things right. Any thoughts on where I missed a step?
    It's possible you may have missed the channel setting in the visibility trace of your service BP, or maybe some other part that is preventing the Blackboard keys from being set. Perhaps you could post a pic of that BP?

    Leave a comment:


  • replied
    Originally posted by Tom Sarkanen View Post
    From the screenshot you posted, it looks like neither TargetToFollow or TargetLocation are set (they are both 'None' in your blackboard view and the red indicator on their decorators indicates that they aborted). This in turn means that when your tree runs that none of its branches do anything.
    What's confusing is that I did this twice from scratch with the same results... I am not sure where I did not set things right. Any thoughts on where I missed a step?

    Leave a comment:


  • replied
    Me I had a question about behavior trees !

    I want to create a command where the AI will create some sort of wall to protect a tower. Keep in mind that I am doing this with C++ and a small portion of blueprints. I just need a little help getting this started and I am pretty sure I will be on my way.

    I had in my something like if(ProjectCharacter.location <= DefenceDistance)
    { AiController->MoveToLocation()}

    Something along these lines however I am not entirely sure if this could work

    Thanks in Advance !

    Leave a comment:


  • replied
    From the screenshot you posted, it looks like neither TargetToFollow or TargetLocation are set (they are both 'None' in your blackboard view and the red indicator on their decorators indicates that they aborted). This in turn means that when your tree runs that none of its branches do anything.

    Leave a comment:


  • replied
    For you information, I follow up those tutorial yesterday and I have similar problems (close enought don't work), but I left on side to work in other things.

    Leave a comment:

Working...
X