If overlapping...
Iv been working on a game based on: http://www.miniclip.com/games/ringshot/en/
I am struggling to get the stuff sorted when the ball stops on a 'ring'. My current system is that each ring has a self.attribute and when they are all true (ball overlapping ring) and 'complete button' is pressed end level. However when the last ball is overlapping this leave the possibility of the 'complete 'button' being pressed when the ball has not stopped on the ring just flying over it. Im sure there is a better way of doing this all but Im not sure, any help would be greatly appreciated!
I am struggling to get the stuff sorted when the ball stops on a 'ring'. My current system is that each ring has a self.attribute and when they are all true (ball overlapping ring) and 'complete button' is pressed end level. However when the last ball is overlapping this leave the possibility of the 'complete 'button' being pressed when the ball has not stopped on the ring just flying over it. Im sure there is a better way of doing this all but Im not sure, any help would be greatly appreciated!
Comments
Here's what I've done;
I have a global boolean attribute for each ring. And a global boolean attribute for level complete.
Firstly in each of your ring actors:
If overlapping, global attribute Ring1 is true, make sure that in the otherwise section the global attribute Ring1 is set to false, so as soon as the ball flys off the other side it becomes false again.
Secondly, I have a pop up screen for detecting when all "rings" are true and thus the level is complete.
In this actor I have a rule that says when ring 1= true & ring 2 = true etc,
Inside which I have a:
Timer after 1sec ( this allows time for the ball to stop)
Inside the timer repeat If ring 1 = true & ring 2 = true etc:
Then global attribute Level Complete = true.
This works for me and you can tweak the timer to your needs to allow for the velocity of the balls.
Hope this helps, ask any questions if it's not clear.
Battleduck