I'm trying to make a VERY simple game, that let water flow through pipes (sprites) by using collision polygons and detection. You win the game by getting water to all the end points.
I'm using a family to hold all my pipe sprites. The family has an instance variable boolean named "Flowing" to check if the sprite is flowing with water or not.
Each sprite have a fixed position and turn 90 degrees when touched. If they are connected to the start sprite, they (should) play frame 1 (green) in the animation. If they are turned again and no longer connected, they (should) play frame 0 (red).
[attachment=1:8f44t3d0][/attachment:8f44t3d0]
But there is something wrong with my game logic thinking, I was thinking that as collision detection is happening all the time, it would set the boolean of the pipe sprites as soon as water gets to them, but that's not the case.. Whats wrong with my eventsheet?
[attachment=2:8f44t3d0][/attachment:8f44t3d0]
Am I not understanding how picking works? Should I be using functions or a kind of loop? I've read the manual on all those subjects, but I'm not getting it...
I have looked at some examples of sprites colliding with sprites, but they don't seem to translate to my problem.
ANY help will be greatly appreciated!