Problem with C++ Class and Behavior Tree/BB
- christian chinchilla
- Mar 15, 2021
- 2 min read
The problem that I was facing was when I was trying to implement a BTTaskNode class into the project. Normally when making the classes no problem occurred to them because this one wouldn't give me the material I wanted. But it was also confusing because it would build the scripts for them but never the object that I needed to use it. Seeing the scripts didn't really help because it just confused me more on to why the other thing wasn't being made. Another problem was when I actually fixed the first problem I ran into a smaller one that was just more annoying than anything. it was that I couldn't set my blackboard keys to the right thing because they wouldn't show up even tho I clearly kept making new ones for it to find easily.
The solution that came up for the first one was actually given to me by one of the persons on the server named Austin. He was nice enough to step into a voice call with me so I can share my screen and he can see the error message. He came up with some ideas on how to fix it but then when the call ended he told me to send him a screenshot of the message so he can try to find if anyone else went through the same issue. Later that night he ended up sending me a link that had a possible way of fixing it and I went into another project to recreate the whole thing just so I wouldn't break the original project. The fix was to add independence to the build which was called "GamplayTasks" after added that part the class was made with no more sign of that error.
The way I ended up fixing the annoying one for the behavior tree was more simple than the first one I went through. mainly since it couldn't find any of the new keys I was making I noticed that it would find one key that it itself would make when I gave it a new parent tree. So I started thinking maybe I use that one and just change its name to the ones I need and see if it will take it in. And boom as soon as I did that it started to find the keys that I needed for the AI to be able to walk around. After that, I finished it up in my own project and tested if everything worked and by the time it did I had a moving AI that would patrol and chase the player if it caught him in his sight.
Comentarios