No announcement yet.

AI Behavior Tutorial Error

  • Filter
  • Time
  • Show
Clear All
new posts

    AI Behavior Tutorial Error

    So im following Epics AI BehaviorTree tutorial

    But i have think i messed something up...
    My Basic AI waits until im in range, starts follwing me.
    But he never stops...
    And everything i got is an error thats says:

    Error Accessed None 'CallFunc_BreakHitResult_HitActor' from node LineTraceByChannel in graph 'EventGraph' in blueprint AgroCheck
    Heres the BP for that - Whatis wrong?
    Click image for larger version

Name:	agro2.PNG
Views:	1
Size:	160.7 KB
ID:	1159501Click image for larger version

Name:	agro1.PNG
Views:	1
Size:	166.7 KB
ID:	1159502

    Ive tried many things now but it seems not effective...
    The AI keeps running after me. Never stopping. And something is causing errors. This tutorial in the wiki realy is bad XD


      I think the Tutorial is out of date. It was made for 4.4 or something. 4.6 and above changed alot.
      I've been working with AI BT alot lately and can give you some pointers.
      Let me know.

      These links were very good.
      Last edited by Kinos141; 08-16-2015, 02:49 PM.
      Check out my page, I'm really excited about it.

      Please check out my AI package: Action AI System Feat. Stealth
      or get it from itch


        Logically youd need a condition to stop following, otherwise your logic flows as follows...

        1-Wait until player controller is in range of say a trigger box
        2-Follow said player and attack....Forever

        Maybe have a second trigger box, once the player controller gets outside the second larger trigger box, the unit stops following, or once the player controller leaves a certain arena the AI stops following. In order to convert what is likely the issue, youll need a separate event to end the follow command.

        Note, I couldnt really read anything on your BP :P so I didnt pay much attention to it.
        Rule#117: "Be polite, be professional, but have a plan to kill everyone you meet."


          Any luck with this problem? I am facing the same problem. AI character keeps chasing my character always.


            Hi. I have somehow managed to get it working in version 4.8.
            The problem was with the behavior tree where we were calling "Move To" node and applying Target Location to it. It was not returning a true value somehow. I replaced this node with a custom task which was very similar to RapidMoveTo task that we created in tutorial. Only Changes were , AIMoveTo node is provided with destination input from Last Target Location present in Blackboard and on FINISH EXECUTE node checkmark the SUCCESS.
            Click image for larger version

Name:	Move To Last Target Location.PNG
Views:	1
Size:	202.3 KB
ID:	1084360

            The behavior tree will look something like this.
            Click image for larger version

Name:	Behavior Tree.PNG
Views:	1
Size:	151.9 KB
ID:	1084361