Unfortunately, this wont be that easy.
The water can flow with 2 direction. Not to mention the cross pipes that has 2 pipes and water can come from... uh... let's says every direction to every direction(I hope you can figure what I mean, since I dont grin ). The best way will be what_do_I_die suggestion by having some preanimated flows.