Uploaded December 2015 | Updated November 2026, 23 hours ago
Usually their AI forces them to build special buildings exactly on the map hint entities; but it's possible to make them accidentally press their fire button when they don't mean to. Usually this will make them fire their shotgun, but it can also cause them to put a regular building down.
Why does this happen? Well, making them a squad leader forces them to periodically stop what they're doing so they can wait for their squad mates to catch up to them. The WaitForOutOfPositionSquadMember AI behavior interrupts whichever AI behavior they were previously doing to make them wait. If they happened to be holding down their virtual +attack1 key right before they got interrupted (which they normally do to repeatedly hit their buildings with the wrench), then they will continue to hold that key down until the WaitForOutOfPositionSquadMember behavior lets them return to what they were previously doing.
Typically this will show up when you destroy the engiebot's sentry; this forces him to switch to the RetreatToCover AI behavior for a few seconds before he can build a new sentry. RetreatToCover happens to make him pull out his shotgun, though he won't actually use it. But if he's in a squad, it's fairly common that in the process of running for cover, his squad mates will get behind a bit, so his AI behavior gets interrupted by WaitForOutOfPositionSquadMember, and this often results in him unintentionally holding down his +attack1 key.
If you get the timing just right, then the WaitForOutOfPositionSquadMember AI behavior will interrupt him right at the moment when he starts his MvMEngineerBuildSentryGun behavior, and since he gets his build PDA out at that point, there's a chance that he'll accidentally hit +attack1 while it's out and build a sentry where he's standing.
Usually their AI forces them to build special buildings exactly on the map hint entities; but it's possible to make them accidentally press their fire button when they don't mean to. Usually this will make them fire their shotgun, but it can also cause them to put a regular building down.
Why does this happen? Well, making them a squad leader forces them to periodically stop what they're doing so they can wait for their squad mates to catch up to them. The WaitForOutOfPositionSquadMember AI behavior interrupts whichever AI behavior they were previously doing to make them wait. If they happened to be holding down their virtual +attack1 key right before they got interrupted (which they normally do to repeatedly hit their buildings with the wrench), then they will continue to hold that key down until the WaitForOutOfPositionSquadMember behavior lets them return to what they were previously doing.
Typically this will show up when you destroy the engiebot's sentry; this forces him to switch to the RetreatToCover AI behavior for a few seconds before he can build a new sentry. RetreatToCover happens to make him pull out his shotgun, though he won't actually use it. But if he's in a squad, it's fairly common that in the process of running for cover, his squad mates will get behind a bit, so his AI behavior gets interrupted by WaitForOutOfPositionSquadMember, and this often results in him unintentionally holding down his +attack1 key.
If you get the timing just right, then the WaitForOutOfPositionSquadMember AI behavior will interrupt him right at the moment when he starts his MvMEngineerBuildSentryGun behavior, and since he gets his build PDA out at that point, there's a chance that he'll accidentally hit +attack1 while it's out and build a sentry where he's standing.
![[2/3] Chase-Down-Stickies TFBot AI Mod (Jan 30 2016)
Part 2: I was working on a TFBot AI mod with the goal to make bots track down enemy stickybombs and then destroy them by shooting/hitting them. (Continue reading!)
Part 1: https://youtu.be/z2M5HtX p4
Part 3: https://youtu.be/vkmh0rE3zLs
This clip is from a couple days after the first clip, and I believe that at this point I had started work on the actual fully-custom AI behavior mod itself. It may look pretty boring, but this video demonstrates that I could get bots to choose targets (enemy stickybombs) and path toward them reliably.
The code for final(ish) version of this mod:
https://github.com/sigsegv-mvm/sigsegv-mvm/blob/dfe7f0d35edef3a8e040f266415751cd5d7b1355/src/mod/pop/extattr/targetstickies.cpp [2/3] Chase-Down-Stickies TFBot AI Mod (Jan 30 2016)](https://i.ytimg.com/vi/r6fwuVO38t8/mqdefault.jpg)






![[3/3] Chase-Down-Stickies TFBot AI Mod (Jan 31 2016)
Part 3: I was working on a TFBot AI mod with the goal to make bots track down enemy stickybombs and then destroy them by shooting/hitting them. (Continue reading!)
Part 1: https://youtu.be/z2M5HtX p4
Part 2: https://youtu.be/r6fwuVO38t8
This clip shows what I believe to be basically the final iteration of the fully-custom AI behavior mod, now featuring custom enemy target identification, target selection, pathfinding, intentionally forcing the bots vision system to ignore any entities that are not stickybombs, and finally, actually shooting the damn things.
Unfortunately, the target selection code was a bit dumb and just chose known stickies randomly, so the bot kinda goes crazy aiming in different random directions, rather than going sticky-by-sticky in a more effective manner. (Could have been implemented, as a distance-to-sticky and difference-of-viewangles optimization heuristic.)
Also there was apparently some kind of weird issue where occasionally the bot would choose a particular sticky, and would become unable to see it for whatever reason; and then it would just stay fixated on that one stickybomb it couldnt shoot in stupid fashion. (I believe this was mitigated somewhat in the code later by adding a 5-second automatic-retarget mechanism, but thats a bit of a kludge.)
The code for final(ish) version of this mod:
https://github.com/sigsegv-mvm/sigsegv-mvm/blob/dfe7f0d35edef3a8e040f266415751cd5d7b1355/src/mod/pop/extattr/targetstickies.cpp [3/3] Chase-Down-Stickies TFBot AI Mod (Jan 31 2016)](https://i.ytimg.com/vi/vkmh0rE3zLs/mqdefault.jpg)


