GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Character Control Problems

dmilinovichiiidmilinovichiii Posts: 620Member
edited November -1 in Tech Support
I'm trying to create movement of a character using onscreen touch controls. When I first attempted this, I had the problem of having to lift my finger before I touched the other arrow to change direction, but I managed to fix this. Unfortunately, this caused another problem. When I released the arrow, my character continued moving. On top of all of this, I can't get the actor to move while falling without loosing all momentum because I want the character to move like how it would move with the move attribute and not the accelerate attribute. Does anyone know how to fix this? I don't have a PhD in math so if it requires advanced math can you please dummy it down for me?

Comments

  • dmilinovichiiidmilinovichiii Posts: 620Member
    Anyone?
  • scitunesscitunes Posts: 4,047Member, Sous Chef
    You have to use accelerate but here's how to make it feel like move:

    Rule - When game.GoRight is true
    -----Rule - when self.LinearMotionX is < 200 (change this value to whatever)
    ---------Accelerate (0 to scene at a VERY HIGH rate - 2000 or so)

    Rule - When game.GoLeft is true
    -----Rule - self.LinearMotionX is > -200
    ---------Accelerate (180 to scene at a VERY HIGH rate - 2000 or so)

    Then play with drag and friction (VERY IMPORTANT!)
  • dmilinovichiiidmilinovichiii Posts: 620Member
    Thanks a lot. This is a big help.
This discussion has been closed.