We use the Past Perfect Continuous to express that an event happened at some time in the past and continued up until another point in the past.
She had been playing netball for ten minutes before she fell and broke her knee.
It can be used to express that something caused something else in the past two happen.
He had been studying hard because he wanted to pass his exams. She passed her exams because she had been studying hard.
We can also use it to express that an event was repeated at sometime in the past and carried on.
Pele was a great footballer. He had been playing since he was 5 years old. Ayrton Senna had been racing in world class competitions but died in a championship race on the 1st May 1994.
Formulas
Subject + had + been + verb + ing + object + ( past simple clause )
Subject + had + not( hadn’t ) + been + verb + ing + object + ( past simple clause )
Had + subject + been + verb + ing + object + ( past simple clause )?
Hadn’t + subject + been + verb + ing + object + ( past simple clause )?
Had + subject + not + been + verb + ing + object + ( past simple clause )?
( Information Questions )
Q/W + Had + subject + been + verb + ing + object + ( past simple clause )?
Q/W + Hadn’t + subject + been + verb + ing + object + ( past simple clause )?
Q/W + Had + subject + not + been + verb + ing + object + ( past simple clause )?