Assistance with left and right movement
butterbean
Member Posts: 4,315
I'm having trouble with the left and right movement with the multi-touch controls
I created 2 boolean attributes game.moveleft and game.moveright
under the Right touch key:
I placed the rule:
When touch is pressed:
Change game.moveright to true
When touch is released:
Change game.moveright to false
(Same thing for left arrow)
Under my main actor:
When game.moveright is true
Animate:
When self.motionlinearvelocityX <175
Accelerate:
1500
Change attribute: Self.facingleft to false
What happens is, when I let off the right or left key, she won't animate moving, but she slides on the ground like it's slippery ice
How do I make her stop, when I had the keyboard controls, they worked perfect with the other rules in place, and she would stop when you let off the left or right key
I created 2 boolean attributes game.moveleft and game.moveright
under the Right touch key:
I placed the rule:
When touch is pressed:
Change game.moveright to true
When touch is released:
Change game.moveright to false
(Same thing for left arrow)
Under my main actor:
When game.moveright is true
Animate:
When self.motionlinearvelocityX <175
Accelerate:
1500
Change attribute: Self.facingleft to false
What happens is, when I let off the right or left key, she won't animate moving, but she slides on the ground like it's slippery ice
How do I make her stop, when I had the keyboard controls, they worked perfect with the other rules in place, and she would stop when you let off the left or right key
Comments
http://gamesalad.com/game/play/23210
I added an accelerate based movement actor. And a stop rule when moveright and moveleft are both false.
Stop uses the Change Velocity to 0.