The Flash” returns this week after a month-long hiatus with Barry (Grant Gustin) making a dangerous play to learn the identity of Savitar.

After an encounter with future villain Abra Kadabra (David Dastmalchian) — who not only knew a future version of Flash, but also who Savitar was — Barry decides the best way to learn more about the God of Speed is to head to the future himself. On top of all that, Caitlin (Danielle Panabaker) has succumbed to her Killer Frost persona and is on the run. All of this is juggled by first-time “Flash” director, and series’ star, Tom Cavanagh.

Variety spoke with Cavanagh — who has played three separate versions of the same character across the show’s three seasons; currently H.R. Wells, and previously Harry Wells and Harrison Wells — about directing different versions of the main characters, how being behind the camera this time differed from his previous directing gigs, and more.

How did directing an episode come about? Was it something you wanted to do or did they approach you about it?
Generally, when I am signing a contract for a television series, we have a handshake deal in there about directing. This is my third show for Greg Berlanti, and they sort of know I like to direct. In the past the stuff that I’ve done seems to have been well-enough received that it allowed me to forge forth.

Did you know when you said you’d direct that it would be this big Barry-heads-to-the-future episode?
They do a ridiculous amount of episodes of “Flash” every year. “The Flash” is one of the most prepared television shows I’ve ever been on, and for the amount of work that comes through the pipeline they are incredibly on top of it. As a director — I’ve been on shows where the director gets the script on the first day of shooting — they will get a script for the entire length of the prep. It gives you a fighting chance.

In terms of what the actual story is going to be, they’ve got a story arc when they start the season but you don’t really know where your story is going to fall. I feel very fortunate to deal with Barry … dealing with Barry. That’s two versions of Grant Gustin, which is phenomenal. I was grateful to have this storyline.

You’re no stranger of playing multiple versions of the same character, or acting opposite yourself. Was it fun directing altered, future versions of the other characters?
That’s part of the aspect of this episode that I really, really liked. We see a whole different world. We got to mess some stuff up. I’ve played five or six or seven different versions of myself since the show started but most of the cast has just played one or two versions of their character. In this one, I think it was great for them to pull out of the hat another version of themselves. I think both Grant and Carlos Valdes in particular were exceptional in this episode. They’re very talented to begin with, but then you add these different layers you kind of marvel at their abilities.

How is it to direct yourself?
I always find it’s really good. If you write something and you have the visual of that in your head, I don’t have to convince the actor — or even explain to the actor — what the visual is. So I can accommodate however I want. One thing I will say, though, if anyone is going to get short-changed when I’m directing it’s not going to be the other actors; it’s going to be me. You become much less self-indulgent.

“The Flash” airs on the CW on Tuesdays at 8 p.m.