AI animations are extremely bizzarre when they are inside of static weapons (GMGs, HMGs, or Mortars) that have been attached to another object with the attachTo command.
They function somewhat normally, and will engage and fire at enemies. However, they jerk about wildly, instantly aiming from one point to the next about every second. This occurs constantly, until several seconds after the AI soldier has been killed.
I am trying to create a script that will create machine gun bunkers all over the map, and periodically man them with AI soldiers. attachTo is a command that allows me to place these guns in the same place every time relative to the bunker itself, regardless of bunker orientation, and more importantly, prevent the machine gun from toppling over should it be struck by an explosive shell, as the machine guns themselves are invulnerable. However, the animation problems are quite visually jarring and render this command useless for this purpose.