IS it possible? Disabling Taps but Enabling Swipes

MADGamesMADGames Member Posts: 12
edited July 2012 in Working with GS (Mac)
Hi GameSalad community,
I'm having a little trouble creating my code for my game. In this case, I have coded swiping through When pressed/released, record mouse.position.x and assign it to a 'touch' and 'release' attribute, then animate a sequence when game.touch and game.release are less or greater than each other (ie. a swipe has occurred). This is all well and good but the problem is you don't necessarily have to swipe, just tap anywhere to the right or left of the previous tap and it will register as a "swipe".

I can combat this situation by either trying another way to get swipe working on my game, or disabling "taps" on the screen so the exploit cannot occur, and only swipes are allowed. Is this possible?

I've tried the things shown in tshirtbooth's MultiScreen menu tutorial, but I find I'm having a hard time incorporating that into my project. I don't understand the "math involved" in the Expression Editor in that tutorial. :/

Thanks for your help in advance!
~Marcus (MADGames)

Comments

  • OskarDeveloperOskarDeveloper Member Posts: 533
    edited July 2012
    I think this is what you are looking for :)
    http://www.mediafire.com/?n600ueg2kyt2aan
    You have to swipe to make the red box move
  • MotherHooseMotherHoose Member Posts: 2,456
    I am not sure of what animating effects you want and when
    for the swipe … this might work:

    Rule: when
    Event: touch is pressed
    -Rule: when (nested in the behavior area)
    -Event: touch is outside
    --Animate
    --Interpolate: self.Position.X To: touches.Touch 1.X

    you do not need to record/store/compare the touch pressed/released positions
    the computer already tracks them …

    put a DisplayText behavior on your Actor
    to display the touches.Touch 1.X … to see the swipe

    image MH
Sign In or Register to comment.