Complex sentence: Unable to distinguish between the Movement, Outsiders and Earth, the aliens went to war with humankind, but when they saw Earth and the Outsiders destroying Movement bases, and the "ondat" learnt that not all humans were the enemy.
Split into simpler sentences: Unable to distinguish between the Movement, Outsiders and Earth, the aliens went to war with humankind. But when they saw Earth and the Outsiders destroying Movement bases, the "ondat" learnt that not all humans were the enemy.