Bonjour
pour savoir si il faut utiliser le Plu perfect ou le prétérit il faut savoir qu'elle est l'action principale au prétérit puis l'action secondaire au plu perfect . Le plu perfect doit conjuguer l'action qui se passe avant celle au prétérit.
1- My grand father had spent two years in England when the war broke up.
2- When I looked at the bag, I noticed someone had already opened it.
3- Although they had watched the film twice, they didn't mind watching it again.
4- I hadn't seen her for a long time when I met her in the street.