to set the scene of how things were or what was happening (past tense of "be" + verb with -ing usually indicates this) when something (expressed with the passé composé) interrupted.
This is formed with the auxiliary verb avoir or être in the present tense along with the past participle. Avoir When used with the auxiliary avoir, the past participle will not agree in gender or number with the subject of the sentence: Elles ont marché pendant deux heures. ('They ...