but obito still needed nagato to revive madara..No pain had a different idea. Obito purposely got nagato killed because he wouldn't go along with the moon eyes plan. Juz my opinion. Obito couldn't bear pain I think and so he sent him on a suicide mission
I doubt that he wanted to do that, he even told madara that he was never his ally and he was very surprised when kabuto showed him madara in the coffin, so he probably didn't have any intentions of reviving madara.but obito still needed nagato to revive madara..