Announcement

Collapse
No announcement yet.

Problem with AI-controller

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

    Problem with AI-controller

    Hi, please help me with this problem:
    I have three type of AI's. Each one is controlled by AI-controller. On Begin Play each AI runs it's unic Behavior Tree:



    Everything works fine until there is more than 50 AI's on the map. In this case, 51-st, 52-nd AI's are just do nothing and their Behavior Tree won't start. I can replicate this problem with 50 AI's of different types and 50 AI's of just one type. Also, amount of working AI's sometimes differs. For example, one time i've got 53 working AI's. But 50 AI's are always stable.
    Could you please help me to solve this problem?

    #2
    I think i put like 6*9 that is 54, but of same type, and it worked. But I am not sure that.
    You should determine if that limit is because of different AIs or maybe it is present with single AI.
    If 50 is the limit my new great idea dies again.
    There may be hardcoded limit on number of AIs. But if so there may be some variable/constant in source we could just change.
    Kind of need Epic here or somebody with lots of time to see in code.

    Comment


      #3
      I tried to put 54 AI's of the same type and only 51 of them work. The same thing is for 54 AI's of different types.

      Comment


        #4
        Edit:

        There is not hardcoded limit at 51. I just ran 200 of myais and everything worked fine but a bit slow.

        Somaybe there is something else that limits your project, (like doing it for mobiles).
        Last edited by Nawrot; 12-16-2015, 04:55 PM.

        Comment


          #5
          Today i managed to test everything again and found, that both MoveTo task in BehaviorTree and Move to Actor node don't work. AI tries to move to the player, and in debug mode i see, that MoveTo and MoveToActor executes, but nothing happens in game, AI stands still. If player comes close to AI, it attacks him and everything else is working fine in accordance to BehaviorTree. Sorry for misleading you. The problem is not with BehaviorTree in general, but only with those two tasks.

          Comment


            #6
            I have spider pawn that has only 3 tasks:
            - find target (when i drop it during runtime)
            - move to target location
            - play animation
            and repeats.

            And i tested that with 200 pawns, everything moved. But i am using move to location (target after spawning is static), not move to actor.
            I really would like to find reason for that limit, this potentially saves me some butthurt later in development.

            Comment


              #7
              Hello Nawrot,
              can you show me please a picture from your Spider-Pawn?
              Kind regards,
              halobungie

              Comment


                #8
                Will do later, but there is nothing to show really, it is most simple AI possible. It has only 3 tasks in behavioral tree.
                Also you want pic of 200 of them moving or my setup? If its setup, well i am not sure if i can get picture of all those little properties i set for ai, pawn etc. Blueprint graph is really like 6 nodes or so.

                Spider model is from Infinity Blade assets from marketplace, it is just for doing AI, real models will come later.
                Last edited by Nawrot; 12-17-2015, 01:40 PM.

                Comment


                  #9
                  Problem was in "Max Agents" option in Edit->Project settings->Crowd manager. Default value is 50. Maybe this information will help someone.

                  Comment


                    #10
                    so if i change the "Max Agents" option in Edit->Project settings->Crowd manager to say 200 then it will work? and how would that effect fps

                    Comment

                    Working...
                    X