If both buildings are below 100% health, they will prefer to repair their sentry gun over repairing their teleporter. In this video, I take advantage of this fact to torture a poor engiebot. Fortunately he's too dumb to realize what's being done to him.