How do I stop 8 angle movement at angle I was moving?

0 favourites
  • 5 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • I can't seem to figure out or find the right tutorial for stopping the 8 angle movement (when I let go of keys) so that the player is facing the angle I was moving in. So if I was moving 45 drgrees, I want that angle to stay if I let go etc.

  • Use a Global variable and call it PLAYERANGLE

    When you move the player set that Global variable to a different number. 1=moving left etc.

    Then use ON KEY RELEASED and PLAYERANGLE=1 set Player Animation to "Left"

    And so on for each angle.

  • change the set angle part at 8 direction bahavior to "No" .. that is all you need to do

  • lamar that works only for up down left and right, as I can not have two key released conditions in the same event. Unless I am missing some thing.

    Though I want my character to face the diagonals of the 8 angle movement when set to 45 degree intervals, when they have stopped moving on that angle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lamar that works only for up down left and right, as I can not have two key released conditions in the same event. Unless I am missing some thing.

    Though I want my character to face the diagonals of the 8 angle movement when set to 45 degree intervals, when they have stopped moving on that angle.

    Did you change the Set Angle to "no" in the sprites behaviors?

    You can use a sub event to check if both keys are released.

    Main event checks if one key released and sub event checks if other key is released.

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