Usually i find that whenever there is a sentry gun in an impassible
place, take the ramp room in 2fort5. If you position yourself so that
you can see half of the sentry gun it usually won't have enough of a
target to shoot. Then after you're properly positioned, aim for the top
left or right corner (depending on which side you attack from) and just
cut loose with the nailgun, don't even flinch if 20 rockets are about to
slam right into you, just keep those nails pouring out. Chances are you
will have destroyed the sentry gun. Even if you die, the engineer will
have to rebuild it, it should take enough time for you to high-tail your
ass back to that room and kill the engineer while he has a half-finished
gun built. If he is building a gun, aim for him not for the gun. He
will either die or break off and go for some health.
Hope this helps all of the Scouts out there!!!
~Stipple Alpha