“Avatar” is episode six of season eight of Stargate SG-1.
The SGC looks to be under attack by a Goa’uld super-soldier, with many people being killed. Except this is not actually what’s happening. Teal’c is in fact playing an experimental virtual reality game in the SGC.
After finishing the game, Teal’c says that it is too easy, and that the two year program designed to create a training tool for SGC personnel has failed. This may be because the test subjects were all lab geeks. Dr Lee wants Teal’c to play the game some more to fix it. Teal’c agrees.
Despite Teal’c’s confidence, something goes wrong and he ends up trapped in the game. Which would probably not be too bad, except the chair is inflicting actual pain on Teal’c, and endangering his health. So Daniel goes in and tries to help.
Rather than make an entire programme look like a computer-generated FPS game (which would probably have cost more and taken longer), they shot the majority of it as live action.