Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Leaderboard

Popular Content

Showing content with the highest reputation on 08/05/2010 in all areas

  1. Presumably you have some code roughly equivalent to this: if key(right): Xvel += 3; if key(left): Xvel += -3; if (Xvel > 0 && !(key(right))): XVel += -1; if (Xvel < 0 && !(key(left))): XVel += 1; [/CODE] Those being rightward acceleration, leftward acceleration, rightward deceleration, and leftward deceleration, respectively. What if you just changed the speed that gets decelerated to, so it's something higher than 0? That way you can stop or move left if you want to, but left alone, your horizontal speed will default to something positive.
    1 point
×
×
  • Create New...