Alyson Hannigan: Willow led to Mother
Hannigan's character is based on executive producer Craig Thomas's wife Rebecca, and Marshall and Lily's antics are loosely based on Thomas's own clumsy romantic experiences.
"I didn't steal too much from her (Rebecca), but I will because she's awesome," Hannigan said.
"It is really cool to be playing somebody who's alive until she hates it and then you're like, 'Oh I don't know, sorry'."
But that is unlikely to happen since Rebecca is a huge Buffy fan and urged Thomas to watch Hannigan in the show.
"Arguably that is why we cast Alyson," Thomas said.
"None of us knew about Buffy and my wife told me to watch it.
"We became almost embarrassingly huge Buffy dorks to the point where I think Alyson is uncomfortable around us sometimes."
Hannigan said she had worried that after Buffy she set her sights too high when looking for new projects and was thankful when How I Met Your Mother came along.
"I was definitely looking for a half-hour show," she said. "It is like doing a play.
"And I really enjoy the energy that you can get from performing in front of an audience and knowing if you hit a joke or if you didn't."