best template for simple run left, run right, and jump

pjnolenpjnolen Member Posts: 152
edited November -1 in Working with GS (Mac)
I'm having some issues with mine and was wondering if anyone had a simple template of buttons for a sidescroller that was 'left' 'right' and 'jump' buttons?

Comments

  • pjnolenpjnolen Member Posts: 152
    Maybe someone can help me with the problem I'm having then.

    I have 'run right' and 'run left' buttons. When you press down, the character will move in that direction. If you release the character will stop.

    BUT

    If you press down, and then SLIDE your finger off the button, it 'locks' down that attribute and doesn't register it as a release, so the character just keeps accelerating.

    It doesn't make any sense that sliding your finger off is NOT considered 'releasing' the button.

    Any player who doesn't remove their finger from the button, and instead slides it back and fourth inbetween them(like an actual game controller where you move from side to side and not push on the right side, raise your finger up, and then push on the left side) will find the game unplayable.

    All I have is two boolean attributes. When you press down, it sets to true, when set to true, move character. when you release, set to false, when set to fall, stop moving character.

    but when you slide your finger off, it doesn't act like a release and keeps it set to true, even if you put down the iphone, it just keeps running across the screen. You can slide up, down, left or right they all have the same effect.
    Any ideas?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Why do you have a release attribute? it you use when touch is pressed to trigger your move attributes and the otherwise for that rule to reverse it you should be good.

    edit:
    or what tshirtbooth said will work too. :)
  • DreamLabDreamLab Member Posts: 2,127
    http://gamesalad.com/forums/topic.php?id=16288

    toast kitten made a platformer example of all of those functions
    DL
Sign In or Register to comment.