Announcement

Collapse
No announcement yet.

AI Character still moving to the player when he cannot see the player?

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

    AI Character still moving to the player when he cannot see the player?

    Hi folks, I'm following this AI tutorial :https://docs.unrealengine.com/en-US/...ees/QuickStart
    The quickstart for the behavior tree.


    Click image for larger version  Name:	image_143233.jpg Views:	1 Size:	207.7 KB ID:	1506501I think my behavior tree is set correctly



    Click image for larger version  Name:	aip3.JPG Views:	1 Size:	172.0 KB ID:	1506502
    As well as the find player service



    Click image for larger version  Name:	aip2.jpg Views:	1 Size:	523.2 KB ID:	1506503

    When the player is seen by the AI, the AI chases him. As you can see, I print what is within AI's radius of awareness, and what he can see in his LOS to the player




    Click image for larger version  Name:	aip4.jpg Views:	1 Size:	447.2 KB ID:	1506505

    When the game is created, there are a cube block the LOS between the player and the AI, the behavior tree stuck at the service.


    Click image for larger version

Name:	image_143236.jpg
Views:	120
Size:	503.2 KB
ID:	1506504

    However, once the AI has "see" the player,the AI will keep "seeing" the player even if he cannot.

    Is there a problem with the service to find the target to chase or maybe there is something wrong elsewhere?

    Thanks...
    Last edited by WildBill16; 07-25-2018, 04:53 AM.

    #2
    So I have to do this?
    That's not the tutorial suggests, I guess?

    Click image for larger version

Name:	aip6.JPG
Views:	109
Size:	73.4 KB
ID:	1506512


    Click image for larger version

Name:	aip7.jpg
Views:	111
Size:	412.3 KB
ID:	1506513

    And then it can go to the right sequence...

    But I got a lot of errors..

    Blueprint Runtime Error: Accessed None trying to read property CallFunc_GetBlackboardValueAsActor_ReturnValue from function: 'PerformConditionCheck' from node: Print String in graph: PerformConditionCheck in object: BT_CloseEnough with description: Accessed None trying to read property CallFunc_GetBlackboardValueAsActor_ReturnValue

    Blueprint Runtime Error: Accessed None trying to read property CallFunc_GetBlackboardValueAsActor_ReturnValue from function: 'PerformConditionCheck' from node: Return Node in graph: PerformConditionCheck in object: BT_CloseEnough with description: Accessed None trying to read property CallFunc_GetBlackboardValueAsActor_ReturnValue


    Click image for larger version

Name:	aip8.JPG
Views:	121
Size:	171.4 KB
ID:	1506514


    It said the problem is within the print string and return node...But this is what the tutorial told me to do...

    Comment

    Working...
    X