best template for simple run left, run right, and jump
pjnolen
Member Posts: 152
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
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?
edit:
or what tshirtbooth said will work too.
toast kitten made a platformer example of all of those functions
DL