Copy Of A.I. Character Will Not Move

Ive created Two Different Ai characters. I duplicated the behavior tree and the controllers and the Character BP. No matter what I do the duplicated units will not move. I can get strings to print and can see the BT firing off but even though the ai knows to “move to” The Pawn will not move. So my question is… When Duplicating A.I characters, from working ones, what stops them from moving?

Nothing stops duplicated AI characters from moving. It just works, so the fault is somewhere in your setup. For example, what do you mean by “duplicating” BT? If we’re talking about level-placed AI you be fine with just duplicating the character that’s physically on the level. Everything else should work out of the box.

Give it a try and let me know.

Cheers,

–mieszko

Hello Mieszko, I am going to try to be more specific. I have an a.i. character that patrols, sees pawns, and hears noise. The a.i I have does everything that I want it to. When I make copies in the map they also work perfectly. The problem occurs when I duplicate the a.i. character Blueprint. UE4 then makes a copy and names it number 2. It uses the same Controller and Behavior Tree. Every thing is the same, other than, it is not the original character Blueprint. I then drag my duplicated/copied a.i. character into the map and place it. When I play it does not move to its patrol or pursue me. I can see the behavior tree firing off telling it to do so. I can get it to print strings saying it sees and hears me. To trouble shoot I have “duplicated the behavior tree(or made a copy)”, I have made a new controller. Ive tried many things. The only way I can get a new character blue print to work is to start over from nothing. The purpose of all of this is to make a.i. characters that I can “drop” into my map, that will have different behaviors. For example one that has a patrol route and one that is stationary. One thing is to make a copy of the whole character Blueprint and remove the patrol behavior as an example. I don’t want to have to recreate everything each time I want to change the behavior of my new a.i character. To summarize: When I copy/duplicate my A.I. Character Blueprint, and then place that new character into my world, and then I press Play, it will not move to any of the locations that it should. How can I make the new copied character act like the original? Thank you so much for your quick response. Ive watched your video on youtube and I am sure you can solve this one with little effort. :slight_smile:

Unfortunately it seems it’s a blueprint duplication issue. I’ll send this over to the BP team.

However, you should not need to duplicate character blueprint to do what dou describe. You should use class inheritance for characters, and different BTs for different “brains”.

Awesome man, Thanks!

MieszkoZ,
I finally figured it out. When you copy an A.I. controller or a Behavior Tree it changes all of the key names to the default value. You have to go through and make sure any “cast to” nodes are replaced with the new copy name and be sure to check all variables and set them appropriately. Then you can duplicate your A.I. Characters!