by skydereign » Sat Jan 07, 2012 7:11 am
Well, if you can disagree with my approach, then we are on the right path. If at any time you see something that does not fit your setup, then by all means make it work. In this case though, I think you are misunderstanding me. collide_button_state is a global variable. That is to say that when you press the button, it sets a variable (you can see it as a condition in your game). While this variable is set, it will cause the collisions between your two ball actors. That if(collide_button_state==1) code is meant to be in the collisions between the two ball actors. The only thing that has to do with the button is the mouse button down and up events that set collide_button_state.