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

Get help using Construct 2

Post » Wed May 29, 2013 9:34 pm

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?
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Wed May 29, 2013 9:39 pm

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!!
B
28
S
6
G
2
Posts: 86
Reputation: 3,267

Post » Wed May 29, 2013 10:18 pm

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.
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Wed May 29, 2013 10:36 pm

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.Xionor2013-05-29 22:36:35
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Wed May 29, 2013 10:44 pm

@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.)
B
20
S
7
G
4
Posts: 322
Reputation: 4,521

Post » Wed May 29, 2013 10:47 pm

@Xionor your best bet is the 'platform' behavior on your character. That allows what you are describing, moving up and right/left (not diagonal.)

http://db.tt/khoIIe6y
B
20
S
7
G
4
Posts: 322
Reputation: 4,521

Post » Wed May 29, 2013 11:05 pm

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.
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Mon May 12, 2014 2:24 am

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.
B
3
Posts: 4
Reputation: 283

Post » Mon May 12, 2014 2:57 am

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.
B
38
S
12
G
11
Posts: 331
Reputation: 7,712


Return to How do I....?

Who is online

Users browsing this forum: Ajbael, ColombageEnPLS, imhotep22, Yahoo [Bot] and 5 guests