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

Get help using Construct 2

Post » Fri Feb 03, 2017 2:21 am

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.
B
15
S
8
G
2
Posts: 68
Reputation: 2,465

Post » Fri Feb 03, 2017 3:01 am

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.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Feb 03, 2017 3:48 am

change the set angle part at 8 direction bahavior to "No" .. that is all you need to do
B
8
S
3
Posts: 46
Reputation: 708

Post » Sat Feb 04, 2017 4:11 pm

@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.
B
15
S
8
G
2
Posts: 68
Reputation: 2,465

Post » Sat Feb 04, 2017 4:33 pm

SpyDaniel wrote:@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.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests