8-Directional Movement, Up & Right at at same time

0 favourites
  • 9 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hey.

    I'm having a problem.

    When using the 8 directional movement, when you press Up and Right, it goes diagonally Up and Right.

    But when you select only 4 directional movement from the options and press Up and Right, it doesn't do anything.

    It does this presumably since there's no diagonal to go to, but since there is no diagonal in only 4 directions mode, it should go Up and Right at the same time.

    I need a 4 directional movement because going Diagonally is slower than going directly right.

    Any ideas how to do this?

  • Not sure if this is correct, but can you not set the sprite to 8 direction movement, change the default controls to 'no' and have an event when you press the up and right keys together, simulate 8 direction movement for up right diagonal.

    Haven't tried but its a guess!!

  • I don't want diagonal movement. My object is constantly moving upwards. I want left to go left and right to go right, but not diagonally. That's because moving right diagonally is slower than moving straight right.

  • Found Solution.

    It was to manually set "Move X pixels at angle" as movement controls left or right.

    It would have been better tho if you were able to set up something like that straight from the 8 directions behavior.

  • Xionor is this like doodle jump? Infinite jumping (if so, you wouldn't need a control to go up! Problem solved, just left and right.)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Xionor your best bet is the 'platform' behavior on your character. That allows what you are describing, moving up and right/left (not diagonal.)

    db.tt/khoIIe6y

  • It's a spaceship that's constantly moving upwards.

    I'm using the "Every Tick Simulate 8 Direction pressing up" for upwards movement.

    But when i press Left to go left, it goes diagonally up-left. And I want to go straight left.

    Pressing left in 4-direction mode ignores input.

    That's why I had to manually make the left-right movement.

  • I would suggest putting the upwards motion into a group, then when the left or right is pressed disable the group. Just enable it again after the left and right movement is done.

  • My question is, why are you using the 8 direction movement if you don't really want the functionality of 8 direction movement. It sounds to me like you could just use an event for the left and right arrows. This shouldn't really change your event list too much and would give much more options.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)