It looks like you're new here. If you want to get involved, click one of these buttons!
I have a sliding button class in which I'm using for my game, and you slide one of the four button to the center to choose something, but unfortunately there is a cheat as you can slide several buttons and if you are precise trigger two or more of the buttons and calling the functions associated with them eventually giving the awnser. Is there a way to set it so if you touch the screen once it will only react to that touch and no others?
Comments
Track the touches in a table, and only move the slider when it is touched by the touch associated with it.
Something like this code
I think this should work.
@Mr_Ninja - why not set a global variable when a button is touched (eg put the button name or number in the variable), and clear it when the touch stops.
But when any button is touched, first check if the variable already has a value (ie set by another button). If so, ignore the touch. This way, only one button can ever "own" a touch.