Issues with AI 3: Return of the Electric Sheep
Author: Adam Toly
I didn't have a lot of time to work on the project this week. The absurd heat wave I was hit by caused the breakers in my house to flip if my computer was on, and also gave me a bout of heat stroke that rendered me out of commission for a day or so. Nevertheless, I still managed to finish some things. I was able to completely iron out the bugs in the command system I designed last week, along with implementing the attack command with our health system. Though this was achieved through much struggle and strife, as I encountered two major issues. One was for some reason, after coming back to the project, none of the units could see each other. The other was that after performing the attack command, the units froze up and would not perform any other command.
The first issue took a while to figure out because one of the first things I did was write off the right solution. Thus, I spent hours running in circles trying to understand why the enemies couldn't acknowledge each other. I tried changing their sight config so they could see all friendly and neutral units, not just enemies. I tried fiddling with team IDs for hours. Finally, after a late night and much exhaustion, I looked back at what I had discarded as an idea so early: visibility collision settings. I had never changed these settings, and as best as I could tell, no one else did either, but changed they were. So, after making it so the Pawn preset could block visibility collision, they worked again.
This second issue also took me hours to figure out. Though I didn't outright ignore the solution like I did with the first one, I did glance at it and hesitate to try it because I was unsure what it would do. All commands in the game are child objects of GenericCommand, which has the function CommandComplete. When a command is done, it calls CommandComplete, which sends a message to the behavior tree, ending the ExecuteCommand task node. For some reason, when this message was sent, the units would not acknowledge it, causing them to just stand there as they waited for the command to end. I could not figure out why. I tried a lot of things, and if I described them all, this post would quickly become a novel, so I'll just give the solution that worked. In the behavior tree on the ExecuteCommand task node, I set it to abort self.
I was felt a lot of things when that worked: relieved, frustrated, depressed, happy that it was over, but the strongest emotion I felt was vindication because I had already said to the team that whatever was wrong had to be small and easy to fix or else it wouldn't be so hard to find.
Get Real-Time Skeletons
Real-Time Skeletons
Status | In development |
Author | TailByte |
Genre | Strategy |
Tags | Hex Based, Indie, Medieval, rts, Singleplayer, Unreal Engine |
More posts
- Level Generation is Very Slow1 day ago
- More Command things2 days ago
- Widget Component Misalignment in RTS UI2 days ago
- Issues with AI 2: Electric Boogaloo8 days ago
- Level Generator Ramp Placement8 days ago
- UI Timer Trouble10 days ago
- Issues with AI15 days ago
- Basic Level Generator15 days ago
- Pause Menu15 days ago
Leave a comment
Log in with itch.io to leave a comment.