Need help making the most accurate left / right touch screen logic

part12studiospart12studios Member Posts: 620
edited July 2012 in Working with GS (Mac)
Hi there everyone,

I'm working on a project that requires speed in tracking touch screen activity. Imagine the old game "track and field" where your left side of the screen is your left foot and the right side of the screen is your right foot. the importance is to always require one foot before the other.. so two left touches wouldn't count.. only the first one.. same with two touches in a row on the right..

So in my tinking.. its important that each side also not be pressing down.. when the other touches.. so for example in one of my recent tests.. holding down on the right pad would mean each left pad touch would register two steps because the right side is constantly being touched..

I just wonder what the most efficient way to do this kind of left / right logic is.. since its about speed, minimal logic should be applied to insure the fastest response times


Thanks!
Caleb

Best Answer

Answers

  • jn2002dkjn2002dk Member Posts: 102
    edited July 2012
    Use a boolean on each side which switches states when ever it's touched and then switch the other actors state too. That way your actor will only respond once and you'll have to touch the other actor to get the first one to respond again

  • part12studiospart12studios Member Posts: 620
    thanks to both of you! I will try that and see what i can come up with!

    Thanks
    Caleb
Sign In or Register to comment.